subtree: improve decision on merges kept in split
[gitweb.git] / notes.c
diff --git a/notes.c b/notes.c
index b3386d6c36f937cdfd796ff7116d3dd616e7f2e2..25cdce28b71a3ff15da424c8d1b1a89e28356dd5 100644 (file)
--- a/notes.c
+++ b/notes.c
@@ -147,7 +147,7 @@ static struct leaf_node *note_tree_find(struct notes_tree *t,
        void **p = note_tree_search(t, &tree, &n, key_sha1);
        if (GET_PTR_TYPE(*p) == PTR_TYPE_NOTE) {
                struct leaf_node *l = (struct leaf_node *) CLR_PTR_TYPE(*p);
-               if (!hashcmp(key_sha1, l->key_oid.hash))
+               if (hasheq(key_sha1, l->key_oid.hash))
                        return l;
        }
        return NULL;
@@ -206,7 +206,7 @@ static void note_tree_remove(struct notes_tree *t,
        if (GET_PTR_TYPE(*p) != PTR_TYPE_NOTE)
                return; /* type mismatch, nothing to remove */
        l = (struct leaf_node *) CLR_PTR_TYPE(*p);
-       if (oidcmp(&l->key_oid, &entry->key_oid))
+       if (!oideq(&l->key_oid, &entry->key_oid))
                return; /* key mismatch, nothing to remove */
 
        /* we have found a matching entry */