diff options
Diffstat (limited to 'modules/context')
-rw-r--r-- | modules/context/repo.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 8e0c584c82..850b127e59 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -466,6 +466,9 @@ const ( // RepoRefLegacy unknown type, make educated guess and redirect. // for backward compatibility with previous URL scheme RepoRefLegacy RepoRefType = iota + // RepoRefAny is for usage where educated guess is needed + // but redirect can not be made + RepoRefAny // RepoRefBranch branch RepoRefBranch // RepoRefTag tag @@ -497,7 +500,7 @@ func getRefNameFromPath(ctx *Context, path string, isExist func(string) bool) st func getRefName(ctx *Context, pathType RepoRefType) string { path := ctx.Params("*") switch pathType { - case RepoRefLegacy: + case RepoRefLegacy, RepoRefAny: if refName := getRefName(ctx, RepoRefBranch); len(refName) > 0 { return refName } |