Show correct text when comparing commits on empty pull request (#16569)

* fix

* use own text

* Update templates/repo/commits_table.tmpl

Co-authored-by: marty <m.karkossa@ultraware.nl>
Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Marty 2021-07-29 04:32:48 +02:00 committed by GitHub
parent 33e0b38287
commit 4e68d6f41d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View file

@ -527,6 +527,10 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
return nil
}
if compareInfo.HeadCommitID == compareInfo.MergeBase {
ctx.Data["IsNothingToCompare"] = true
}
ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes
if pull.IsWorkInProgress() {