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:
zeripathandtechknowlogick authored and GitHub committed 2020-06-11 19:49:47 -04:00
1 parent 6c2a59b50c
commit 0973c03601
8 files changed
+42 -88

No files matched your search

+1 -1
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
}