1
0
Fork 0
forked from forgejo/forgejo

Handle more pathological branch and tag names (#11843)

* Handle more pathological branch and tag names

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix failing test

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
zeripath 2020-06-12 00:49:47 +01:00 committed by GitHub
parent 6c2a59b50c
commit 0973c03601
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 42 additions and 88 deletions

View file

@ -66,7 +66,7 @@ func NewPullRequest(repo *models.Repository, pull *models.Issue, labelIDs []int6
defer baseGitRepo.Close()
compareInfo, err := baseGitRepo.GetCompareInfo(pr.BaseRepo.RepoPath(),
pr.BaseBranch, pr.GetGitRefName())
git.BranchPrefix+pr.BaseBranch, pr.GetGitRefName())
if err != nil {
return err
}