private @Nullable String findCurrentBranchName(@NotNull Repository.State state, @NotNull HeadInfo headInfo) {
    String currentBranch = null;
    if (headInfo.isBranch) {
      currentBranch = headInfo.content;
    }
    else if (state == Repository.State.REBASING) {
      currentBranch = tryFindRebaseBranch();
    }
    return addRefsHeadsPrefixIfNeeded(currentBranch);
  }
private @Nullable String findCurrentBranchName(@NotNull Repository.State state, @NotNull HeadInfo headInfo)