Added short-hash support to downloads

release/v1.15
Bwko 2016-11-23 22:06:56 +01:00
parent b2cce12980
commit ff0d1bd602
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,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)