diff --git a/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java b/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java index c7fe916571a7..32320c798675 100644 --- a/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java +++ b/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java @@ -75,14 +75,15 @@ public class GitUpdateProcess { */ public boolean update() { LOG.info("update started"); - // check if update is possible - if (checkRebaseInProgress() || checkMergeInProgress() || checkUnmergedFiles()) { return false; } - if (!allTrackedBranchesConfigured()) { return false; } - final GitChangesSaver saver = GitChangesSaver.getSaver(myProject, myProgressIndicator, "Uncommitted changes before update operation at " + DateFormatUtil.formatDateTime(Clock.getTime())); + myProjectManager.blockReloadingProjectOnExternalChanges(); try { + // check if update is possible + if (checkRebaseInProgress() || checkMergeInProgress() || checkUnmergedFiles()) { return false; } + if (!allTrackedBranchesConfigured()) { return false; } + saver.saveLocalChanges(); // update each root boolean incomplete = false;