GitUpdateResult (final UpdateMethod updateMethod) { LOG.info("update started|" + updateMethod); String oldText = myProgressIndicator.getText(); myProgressIndicator.setText(GitBundle.message("update.process.progress.title")); // check if update is possible if (checkRebaseInProgress() || isMergeInProgress() || areUnmergedFiles()) { return GitUpdateResult.NOT_READY; } Map<GitRepository, GitBranchPair> trackedBranches = myUpdateConfig != null ? myUpdateConfig : checkTrackedBranchesConfiguration(); if (ContainerUtil.isEmpty(trackedBranches)) { return GitUpdateResult.NOT_READY; } if (!fetchAndNotify(trackedBranches)) { return GitUpdateResult.NOT_READY; } GitUpdateResult result; try (AccessToken ignore = DvcsUtil.workingTreeChangeStarted(myProject, GitBundle.message("activity.name.update"))) { result = updateImpl(updateMethod); } myProgressIndicator.setText(oldText); return result; }