diff options
author | Vicent Marti <vicent@github.com> | 2014-06-10 14:56:11 +0400 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-06-10 14:56:11 +0400 |
commit | 7064cdafbd25f66de016467b381d9f4474fba40a (patch) | |
tree | d2238e7c017c7c07f00bb9b4818ac7c410a307e1 | |
parent | 17fbf852a5c210cfa6a4e1e906dd9e35d2adc1c1 (diff) | |
parent | 2c11d2eeb550ed2f795c714829b3fd3788b2ab68 (diff) |
Merge pull request #2416 from libgit2/cmn/treebuilder-insert-sorted
treebuilder: insert sorted
-rw-r--r-- | src/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tree.c b/src/tree.c index 94f779eca..b64efe460 100644 --- a/src/tree.c +++ b/src/tree.c @@ -460,7 +460,7 @@ static int append_entry( git_oid_cpy(&entry->oid, id); entry->attr = (uint16_t)filemode; - if (git_vector_insert(&bld->entries, entry) < 0) { + if (git_vector_insert_sorted(&bld->entries, entry, NULL) < 0) { git__free(entry); return -1; } @@ -671,7 +671,7 @@ int git_treebuilder_insert( entry = alloc_entry(filename); GITERR_CHECK_ALLOC(entry); - if (git_vector_insert(&bld->entries, entry) < 0) { + if (git_vector_insert_sorted(&bld->entries, entry, NULL) < 0) { git__free(entry); return -1; } |