aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_tree.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_tree.go')
-rw-r--r--modules/git/repo_tree.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/repo_tree.go b/modules/git/repo_tree.go
index 4b9e61f264..b31e4330cd 100644
--- a/modules/git/repo_tree.go
+++ b/modules/git/repo_tree.go
@@ -26,7 +26,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 {
- res, err := NewCommand("rev-parse", idStr).RunInDir(repo.Path)
+ res, err := NewCommand("rev-parse", "--verify", idStr).RunInDir(repo.Path)
if err != nil {
return nil, err
}