summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index fdf4cd5594..c25f5c67cc 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -318,7 +318,7 @@ func Download(ctx *context.Context) {
ctx.Handle(500, "GetTagCommit", err)
return
}
- } else if len(refName) == 40 {
+ } else if len(refName) >= 4 && len(refName) <= 40 {
commit, err = gitRepo.GetCommit(refName)
if err != nil {
ctx.Handle(404, "GetCommit", nil)