diff options
Diffstat (limited to 'src/tree.c')
-rw-r--r-- | src/tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tree.c b/src/tree.c index 2de8e72e1..aab4b58ad 100644 --- a/src/tree.c +++ b/src/tree.c @@ -476,7 +476,8 @@ int git_tree__parse(void *_tree, git_odb_object *odb_obj) buffer += GIT_OID_RAWSZ; } - git_vector_sort(&tree->entries); + /* The tree is sorted by definition. Bad inputs give bad outputs */ + tree->entries.flags |= GIT_VECTOR_SORTED; return 0; } |