Skip to content

Commit ff0d1bd

Browse files
committed
Added short-hash support to downloads
1 parent b2cce12 commit ff0d1bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/repo/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func Download(ctx *context.Context) {
311311
ctx.Handle(500, "GetTagCommit", err)
312312
return
313313
}
314-
} else if len(refName) == 40 {
314+
} else if len(refName) >= 4 && len(refName) <= 40 {
315315
commit, err = gitRepo.GetCommit(refName)
316316
if err != nil {
317317
ctx.Handle(404, "GetCommit", nil)

0 commit comments

Comments
 (0)