mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-24 18:56:11 +01:00
Added short-hash support to downloads
This commit is contained in:
parent
b2cce12980
commit
ff0d1bd602
|
@ -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…
Reference in a new issue