Browse Source

Added short-hash support to downloads

for-closed-social
Bwko 8 years ago
parent
commit
ff0d1bd602
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      routers/repo/repo.go

+ 1
- 1
routers/repo/repo.go 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)

Loading…
Cancel
Save