mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 09:09:02 +00:00
Merge pull request #228 from Bwko/feature/short-hash-download
Added short-hash support to downloads
This commit is contained in:
commit
b6b616b336
|
@ -318,7 +318,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…
Reference in a new issue