Skip to content

Commit b6b616b

Browse files
authored
Merge pull request #228 from Bwko/feature/short-hash-download
Added short-hash support to downloads
2 parents 289f819 + ff0d1bd commit b6b616b

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
@@ -318,7 +318,7 @@ func Download(ctx *context.Context) {
318318
ctx.Handle(500, "GetTagCommit", err)
319319
return
320320
}
321-
} else if len(refName) == 40 {
321+
} else if len(refName) >= 4 && len(refName) <= 40 {
322322
commit, err = gitRepo.GetCommit(refName)
323323
if err != nil {
324324
ctx.Handle(404, "GetCommit", nil)

0 commit comments

Comments
 (0)