Added short-hash support to downloads

tokarchuk/v1.17
Bwko 8 years ago
parent b2cce12980
commit ff0d1bd602
  1. 2
      routers/repo/repo.go

@ -311,7 +311,7 @@ func Download(ctx *context.Context) {
ctx.Handle(500, "GetTagCommit", err) ctx.Handle(500, "GetTagCommit", err)
return return
} }
} else if len(refName) == 40 { } else if len(refName) >= 4 && len(refName) <= 40 {
commit, err = gitRepo.GetCommit(refName) commit, err = gitRepo.GetCommit(refName)
if err != nil { if err != nil {
ctx.Handle(404, "GetCommit", nil) ctx.Handle(404, "GetCommit", nil)

Loading…
Cancel
Save