From 0e0a4e003e307f68e0ea0e5eeed62125c9870dee Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Tue, 29 May 2018 21:14:58 +0300 Subject: [PATCH] Revert "git: don't show incorrect notification about "local changes not restored"" This reverts commit ef22124 This is just a follow-up reverted with the main revert of 9d9c015 --- plugins/git4idea/src/git4idea/update/GitUpdateProcess.java | 6 +----- .../git4idea/src/git4idea/util/GitPreservingProcess.java | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java b/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java index d2a4108acbbe..4b2df75d76fb 100644 --- a/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java +++ b/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java @@ -241,11 +241,7 @@ public class GitUpdateProcess { notifyImportantError(myProject, "Error updating " + rootName, "Updating " + rootName + " failed with an error: " + e.getLocalizedMessage()); } - }) { - protected boolean shouldNotifyLocalChangesAreNotRestored() { - return unstashAfterUpdate(); - } - }; + }); myPreservingProcess.execute(() -> { if (!unstashAfterUpdate()) return false; diff --git a/plugins/git4idea/src/git4idea/util/GitPreservingProcess.java b/plugins/git4idea/src/git4idea/util/GitPreservingProcess.java index b3e6e0152b7a..c70e8c69ead1 100644 --- a/plugins/git4idea/src/git4idea/util/GitPreservingProcess.java +++ b/plugins/git4idea/src/git4idea/util/GitPreservingProcess.java @@ -100,7 +100,7 @@ public class GitPreservingProcess { LOG.debug("loading"); load(); } - else if (shouldNotifyLocalChangesAreNotRestored()) { + else { mySaver.notifyLocalChangesAreNotRestored(); } } @@ -111,10 +111,6 @@ public class GitPreservingProcess { new GitFreezingProcess(myProject, myOperationTitle, operation).execute(); } - protected boolean shouldNotifyLocalChangesAreNotRestored() { - return true; - } - /** * Configures the saver: i.e. notifications and texts for the GitConflictResolver used inside. */