diff options
author | zeripath <art27@cantab.net> | 2021-09-27 13:19:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-27 13:19:34 +0100 |
commit | 920608e592549fa18991758eb2aa1761cfb8c6ba (patch) | |
tree | 2cd5fd512782719d5936f724e680fdbc7a4fb45e /services/gitdiff/gitdiff_test.go | |
parent | 123f0aea00687d98893036e252efa7ff672b3ad5 (diff) | |
download | gitea-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/gitdiff/gitdiff_test.go')
-rw-r--r-- | services/gitdiff/gitdiff_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/gitdiff/gitdiff_test.go b/services/gitdiff/gitdiff_test.go index 0d8d60d94f..0c216ccb54 100644 --- a/services/gitdiff/gitdiff_test.go +++ b/services/gitdiff/gitdiff_test.go @@ -523,7 +523,7 @@ func TestGetDiffRangeWithWhitespaceBehavior(t *testing.T) { defer gitRepo.Close() for _, behavior := range []string{"-w", "--ignore-space-at-eol", "-b", ""} { diffs, err := GetDiffRangeWithWhitespaceBehavior(gitRepo, "559c156f8e0178b71cb44355428f24001b08fc68", "bd7063cc7c04689c4d082183d32a604ed27a24f9", - setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffFiles, behavior) + setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffFiles, behavior, false) assert.NoError(t, err, fmt.Sprintf("Error when diff with %s", behavior)) for _, f := range diffs.Files { assert.True(t, len(f.Sections) > 0, fmt.Sprintf("%s should have sections", f.Name)) |