public static @NotNull UpdateMethod resolveUpdateMethod(@NotNull GitRepository repository) {
    Project project = repository.getProject();
    GitLocalBranch branch = repository.getCurrentBranch();
    if (branch != null) {
      String branchName = branch.getName();
      try {
        String rebaseValue = GitConfigUtil.getValue(project, repository.getRoot(), "branch." + branchName + ".rebase");
        if (rebaseValue != null) {
          if (isRebaseValue(rebaseValue)) {
            return REBASE;
          }
          if (GitConfigUtil.getBooleanValue(rebaseValue) == Boolean.FALSE) {
            // explicit override of a more generic pull.rebase config value
            return MERGE;
          }
          LOG.warn("Unknown value for branch." + branchName + ".rebase: " + rebaseValue);
        }
      }
      catch (VcsException e) {
        LOG.warn("Couldn't get git config branch." + branchName + ".rebase");
      }
    }

    if (GitVersionSpecialty.KNOWS_PULL_REBASE.existsIn(project)) {
      try {
        String pullRebaseValue = GitConfigUtil.getValue(project, repository.getRoot(), "pull.rebase");
        if (pullRebaseValue != null && isRebaseValue(pullRebaseValue)) return REBASE;
      }
      catch (VcsException e) {
        LOG.warn("Couldn't get git config pull.rebase");
      }
    }

    return MERGE;
  }
public static @NotNull UpdateMethod resolveUpdateMethod(@NotNull GitRepository repository)