git: don't show incorrect notification about "local changes not restored"

Follow-up: 9d9c015
This commit is contained in:
Kirill Likhodedov
2018-05-29 20:40:39 +03:00
parent b7998a157a
commit ef221245a3
2 changed files with 10 additions and 2 deletions
@@ -241,7 +241,11 @@ 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;
@@ -100,7 +100,7 @@ public class GitPreservingProcess {
LOG.debug("loading");
load();
}
else {
else if (shouldNotifyLocalChangesAreNotRestored()) {
mySaver.notifyLocalChangesAreNotRestored();
}
}
@@ -111,6 +111,10 @@ 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.
*/