aboutsummaryrefslogtreecommitdiffstats
path: root/services/pull/pull.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-09-27 13:19:34 +0100
committerGitHub <noreply@github.com>2021-09-27 13:19:34 +0100
commit920608e592549fa18991758eb2aa1761cfb8c6ba (patch)
tree2cd5fd512782719d5936f724e680fdbc7a4fb45e /services/pull/pull.go
parent123f0aea00687d98893036e252efa7ff672b3ad5 (diff)
downloadgitea-920608e592549fa18991758eb2aa1761cfb8c6ba.tar.gz
gitea-920608e592549fa18991758eb2aa1761cfb8c6ba.zip
Support direct comparison (git diff a..b) as well merge comparison (a...b) (#16635)
This PR changes the compare page to make the "..." in the between branches a clickable link. This changes the comparison type from "..." to "..". Similarly it makes the initial compare icon clickable to switch the head and base branches. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'services/pull/pull.go')
-rw-r--r--services/pull/pull.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/pull/pull.go b/services/pull/pull.go
index f7e231379b..f7d154cfd0 100644
--- a/services/pull/pull.go
+++ b/services/pull/pull.go
@@ -80,7 +80,7 @@ func NewPullRequest(repo *models.Repository, pull *models.Issue, labelIDs []int6
defer baseGitRepo.Close()
compareInfo, err := baseGitRepo.GetCompareInfo(pr.BaseRepo.RepoPath(),
- git.BranchPrefix+pr.BaseBranch, pr.GetGitRefName())
+ git.BranchPrefix+pr.BaseBranch, pr.GetGitRefName(), true)
if err != nil {
return err
}