summaryrefslogtreecommitdiff
path: root/src/tree.c
diff options
context:
space:
mode:
authorShuhei Tanuma <shuhei.tanuma@gmail.com>2011-04-06 02:22:24 +0900
committerVicent Marti <tanoku@gmail.com>2011-04-08 03:30:47 +0300
commit98ac67808559e8c2238a855feb6fedfc4b956984 (patch)
tree033471204862ab70f4a42f51823568b2fb399c5a /src/tree.c
parent5868cd02b7ff21f848b64ead3d7b0aa62155046e (diff)
downloadlibgit2-98ac67808559e8c2238a855feb6fedfc4b956984.tar.gz
fix git_treebuilder_insert probrem.
couldn't add new entry when inserting new one with `git_treebuilder_insert`.
Diffstat (limited to 'src/tree.c')
-rw-r--r--src/tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tree.c b/src/tree.c
index 693ed1caa..b474d394b 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -364,7 +364,7 @@ int git_treebuilder_insert(git_tree_entry **entry_out, git_treebuilder *bld, con
git_oid_cpy(&entry->oid, id);
entry->attr = attributes;
- if (pos != GIT_ENOTFOUND) {
+ if (pos == GIT_ENOTFOUND) {
if (git_vector_insert(&bld->entries, entry) < 0)
return GIT_ENOMEM;
}