mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
shelf: optimize - do not load patch file for each change
GitOrigin-RevId: 85424b5e32e69cd2157dedc860aa7c88094f528c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e6f8684bc4
commit
32bd852212
+3
-2
@@ -1166,8 +1166,9 @@ public class ShelveChangesManager implements PersistentStateComponent<Element>,
|
||||
try {
|
||||
final CommitContext commitContext = new CommitContext();
|
||||
final List<FilePatch> patches = new ArrayList<>();
|
||||
for (ShelvedChange change : listCopy.getChanges(myProject)) {
|
||||
patches.add(change.loadFilePatch(myProject, commitContext));
|
||||
List<TextFilePatch> filePatches = loadPatches(myProject, listCopy.PATH, commitContext);
|
||||
for (ShelvedChange change : Objects.requireNonNull(listCopy.getChanges(myProject))) {
|
||||
patches.add(find(filePatches, patch -> change.getBeforePath().equals(patch.getBeforeName())));
|
||||
}
|
||||
writePatchesToFile(myProject, listCopy.PATH, patches, commitContext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user