boolean (@NotNull Collection<? extends GitRepository> repositories) { for (GitRepository repository : repositories) { Hash startHash = getHead(repository); GitSimpleEventDetector mergeConflict = new GitSimpleEventDetector(GitSimpleEventDetector.Event.MERGE_CONFLICT); GitCommandResult result = myGit.merge(repository, myBranchToMerge, Collections.emptyList(), mergeConflict); if (!result.success()) { if (mergeConflict.hasHappened()) { myConflictedRepositories.put(repository, Boolean.TRUE); updateAndRefreshChangedVfs(repository, startHash); markSuccessful(repository); } else { fatalError(getCommonErrorTitle(), result); return false; } } else { updateAndRefreshChangedVfs(repository, startHash); markSuccessful(repository); } } return true; }