diff options
author | zeripath <art27@cantab.net> | 2022-01-18 07:45:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 07:45:43 +0000 |
commit | 089b4e6a4585a3d9d185abd9350e7c5d537cfa86 (patch) | |
tree | 3dce475b8653d0633b139ad65b20a9e5c7859807 /routers/web/repo/pull.go | |
parent | a7ee4d507a0edb2fa90ac25299a27298de941a41 (diff) | |
download | gitea-089b4e6a4585a3d9d185abd9350e7c5d537cfa86.tar.gz gitea-089b4e6a4585a3d9d185abd9350e7c5d537cfa86.zip |
Use indirect comparison when showing pull requests (#18313)
When generating the commits list and number of files changed for PRs and
compare we should use "..." always not "..".
Fix #18303
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/web/repo/pull.go')
-rw-r--r-- | routers/web/repo/pull.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 984954b704..6e68fd0c69 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -358,7 +358,7 @@ func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.C } compareInfo, err := ctx.Repo.GitRepo.GetCompareInfo(ctx.Repo.Repository.RepoPath(), - baseCommit, pull.GetGitRefName(), true, false) + baseCommit, pull.GetGitRefName(), false, false) if err != nil { if strings.Contains(err.Error(), "fatal: Not a valid object name") || strings.Contains(err.Error(), "unknown revision or path not in the working tree") { ctx.Data["IsPullRequestBroken"] = true @@ -441,7 +441,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare } compareInfo, err := baseGitRepo.GetCompareInfo(pull.BaseRepo.RepoPath(), - pull.MergeBase, pull.GetGitRefName(), true, false) + pull.MergeBase, pull.GetGitRefName(), false, false) if err != nil { if strings.Contains(err.Error(), "fatal: Not a valid object name") { ctx.Data["IsPullRequestBroken"] = true @@ -557,7 +557,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare } compareInfo, err := baseGitRepo.GetCompareInfo(pull.BaseRepo.RepoPath(), - git.BranchPrefix+pull.BaseBranch, pull.GetGitRefName(), true, false) + git.BranchPrefix+pull.BaseBranch, pull.GetGitRefName(), false, false) if err != nil { if strings.Contains(err.Error(), "fatal: Not a valid object name") { ctx.Data["IsPullRequestBroken"] = true |