private boolean doMerge(@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, myReferenceToMerge.getFullName(), 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;
  }
private boolean doMerge(@NotNull Collection<? extends GitRepository> repositories)