1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-05 13:58:12 +00:00
Files
gitea/modules/git/repo_commit.go
zeripath 101fb0d7e2 Do not assume all 40 char strings are SHA1s (#14624) (#14648)
Backport #14624

GetCommit() assumes that all 40 char strings are SHA1s. This leads to an
error if you try to do a PR on a branch which is 40 characters long.

This PR attempts the SHA first - and if it fails will switch to using rev-parse.

Fix #14470

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-02-14 01:25:47 +08:00

16 KiB