diff options
author | Thomas Boerger <thomas@webhippie.de> | 2016-11-24 13:38:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-24 13:38:14 +0100 |
commit | b6b616b336333c69255b0436a81d712dcd8dcdc9 (patch) | |
tree | 289f1a5b706adf77dee33a95e01568e2eec200ee /routers/repo/repo.go | |
parent | 289f819f781e8aededb1ffab42be4b670558d37a (diff) | |
parent | ff0d1bd602c725726ce60b5964c62003c75312b9 (diff) | |
download | gitea-b6b616b336333c69255b0436a81d712dcd8dcdc9.tar.gz gitea-b6b616b336333c69255b0436a81d712dcd8dcdc9.zip |
Merge pull request #228 from Bwko/feature/short-hash-download
Added short-hash support to downloads
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index fdf4cd5594..c25f5c67cc 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -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) |