mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
[v15.0/forgejo] fix: compare branches with names diff or patch (#12233)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/12227 Closes: Codeberg/Community#2538 Regression of: !5385 Co-authored-by: Robert Wolff <mahlzahn@posteo.de> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12233 Reviewed-by: Robert Wolff <mahlzahn@posteo.de>
This commit is contained in:
parent
2bd5fcbd2a
commit
ab9856c92d
4 changed files with 20 additions and 7 deletions
|
|
@ -0,0 +1 @@
|
|||
f27c2b2b03dcab38beaf89b0ab4ff61f6de63441
|
||||
|
|
@ -0,0 +1 @@
|
|||
f27c2b2b03dcab38beaf89b0ab4ff61f6de63441
|
||||
|
|
@ -239,6 +239,16 @@ func TestCompareBranches(t *testing.T) {
|
|||
diffChanges = []string{"test.txt"}
|
||||
|
||||
inspectCompare(t, htmlDoc, diffCount, diffChanges)
|
||||
|
||||
// Branches with name 'diff' or 'patch'
|
||||
req = NewRequest(t, "GET", "/user2/repo16/compare/master..diff")
|
||||
session.MakeRequest(t, req, http.StatusOK)
|
||||
req = NewRequest(t, "GET", "/user2/repo16/compare/master..diff.patch")
|
||||
session.MakeRequest(t, req, http.StatusOK)
|
||||
req = NewRequest(t, "GET", "/user2/repo16/compare/master..patch")
|
||||
session.MakeRequest(t, req, http.StatusOK)
|
||||
req = NewRequest(t, "GET", "/user2/repo16/compare/master..patch.diff")
|
||||
session.MakeRequest(t, req, http.StatusOK)
|
||||
}
|
||||
|
||||
func TestCompareWithPRsDisabled(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue