diff options
author | Jason Song <i@wolfogre.com> | 2022-12-28 18:03:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-28 11:03:21 +0100 |
commit | e9bc2c77c35d078c5ba5e6107c3551f31410c936 (patch) | |
tree | 8c0b771a9efe60101fd5520db7403ed9c59e2f31 /modules/git/repo_tree_nogogit.go | |
parent | 9b4da56963692819d236b07504e565d4b4fb4021 (diff) | |
download | gitea-e9bc2c77c35d078c5ba5e6107c3551f31410c936.tar.gz gitea-e9bc2c77c35d078c5ba5e6107c3551f31410c936.zip |
Use complete SHA to create and query commit status (#22244) (#22257)
Backport #22244.
Fix #13485.
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/git/repo_tree_nogogit.go')
-rw-r--r-- | modules/git/repo_tree_nogogit.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/repo_tree_nogogit.go b/modules/git/repo_tree_nogogit.go index dc4a5becb9..6dea6cf026 100644 --- a/modules/git/repo_tree_nogogit.go +++ b/modules/git/repo_tree_nogogit.go @@ -67,7 +67,7 @@ func (repo *Repository) getTree(id SHA1) (*Tree, error) { // GetTree find the tree object in the repository. func (repo *Repository) GetTree(idStr string) (*Tree, error) { - if len(idStr) != 40 { + if len(idStr) != SHAFullLength { res, err := repo.GetRefCommitID(idStr) if err != nil { return nil, err |