Merge branch 'nd/config-split'
[gitweb.git] / fast-import.c
index af6514fdea9959b26355b328221ceb67eaf1432f..95600c78e048f9d3d28672737d4bc2a941073abc 100644 (file)
@@ -573,7 +573,7 @@ static struct object_entry *find_object(struct object_id *oid)
        unsigned int h = oid->hash[0] << 8 | oid->hash[1];
        struct object_entry *e;
        for (e = object_table[h]; e; e = e->next)
-               if (!oidcmp(oid, &e->idx.oid))
+               if (oideq(oid, &e->idx.oid))
                        return e;
        return NULL;
 }
@@ -584,7 +584,7 @@ static struct object_entry *insert_object(struct object_id *oid)
        struct object_entry *e = object_table[h];
 
        while (e) {
-               if (!oidcmp(oid, &e->idx.oid))
+               if (oideq(oid, &e->idx.oid))
                        return e;
                e = e->next;
        }
@@ -1534,7 +1534,7 @@ static int tree_content_set(
                        if (!*slash1) {
                                if (!S_ISDIR(mode)
                                                && e->versions[1].mode == mode
-                                               && !oidcmp(&e->versions[1].oid, oid))
+                                               && oideq(&e->versions[1].oid, oid))
                                        return 0;
                                e->versions[1].mode = mode;
                                oidcpy(&e->versions[1].oid, oid);
@@ -2650,7 +2650,7 @@ static int parse_from(struct branch *b)
                struct object_entry *oe = find_mark(idnum);
                if (oe->type != OBJ_COMMIT)
                        die("Mark :%" PRIuMAX " not a commit", idnum);
-               if (oidcmp(&b->oid, &oe->idx.oid)) {
+               if (!oideq(&b->oid, &oe->idx.oid)) {
                        oidcpy(&b->oid, &oe->idx.oid);
                        if (oe->pack_id != MAX_PACK_ID) {
                                unsigned long size;
@@ -2668,7 +2668,7 @@ static int parse_from(struct branch *b)
        else
                die("Invalid ref name or SHA1 expression: %s", from);
 
-       if (b->branch_tree.tree && oidcmp(&oid, &b->branch_tree.versions[1].oid)) {
+       if (b->branch_tree.tree && !oideq(&oid, &b->branch_tree.versions[1].oid)) {
                release_tree_content_recursive(b->branch_tree.tree);
                b->branch_tree.tree = NULL;
        }