mirror of
https://github.com/go-gitea/gitea
synced 2025-08-15 14:08:28 +00:00
Backport #20461 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -100,6 +100,9 @@ func RefURL(repoURL, ref string) string {
|
||||
return repoURL + "/src/branch/" + refName
|
||||
case strings.HasPrefix(ref, TagPrefix):
|
||||
return repoURL + "/src/tag/" + refName
|
||||
case !IsValidSHAPattern(ref):
|
||||
// assume they mean a branch
|
||||
return repoURL + "/src/branch/" + refName
|
||||
default:
|
||||
return repoURL + "/src/commit/" + refName
|
||||
}
|
||||
|
Reference in New Issue
Block a user