From e87a9fb7dcf32dd06ef7ef53828093acae93c2db Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 18 Mar 2016 08:52:58 +0100 Subject: [PATCH] don't save all documents after every command involving file system changes under VCS: seems to be not needed --- .../src/com/intellij/openapi/vcs/VcsVFSListener.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsVFSListener.java b/platform/vcs-api/src/com/intellij/openapi/vcs/VcsVFSListener.java index 4ee2d8c3df6e..daae2529369f 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsVFSListener.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/VcsVFSListener.java @@ -490,15 +490,6 @@ public abstract class VcsVFSListener implements Disposable { if (myCommandLevel == 0) { if (!myAddedFiles.isEmpty() || !myDeletedFiles.isEmpty() || !myDeletedWithoutConfirmFiles.isEmpty() || !myMovedFiles.isEmpty() || ! myDirtyFiles.isEmpty()) { - // avoid reentering commandFinished handler - saving the documents may cause a "before file deletion" event firing, - // which will cause closing the text editor, which will itself run a command that will be caught by this listener - myCommandLevel++; - try { - FileDocumentManager.getInstance().saveAllDocuments(); - } - finally { - myCommandLevel--; - } doNotDeleteAddedCopiedOrMovedFiles(); checkMovedAddedSourceBack(); if (!myAddedFiles.isEmpty()) {