1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Merge pull request #228 from Bwko/feature/short-hash-download

Added short-hash support to downloads
This commit is contained in:
Thomas Boerger 2016-11-24 13:38:14 +01:00 committed by GitHub
commit b6b616b336

View file

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