convert "oidcmp() != 0" to "!oideq()"
[gitweb.git] / merge-recursive.c
index bd053c70dfc518b6265ec273aad2e61c05d60d18..2904cb825eea64bef30d99417f343fe63ddcb12a 100644 (file)
@@ -156,7 +156,7 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two,
                shift_tree_by(&one->object.oid, &two->object.oid, &shifted,
                              subtree_shift);
        }
-       if (!oidcmp(&two->object.oid, &shifted))
+       if (oideq(&two->object.oid, &shifted))
                return two;
        return lookup_tree(the_repository, &shifted);
 }
@@ -179,7 +179,7 @@ static int oid_eq(const struct object_id *a, const struct object_id *b)
 {
        if (!a && !b)
                return 2;
-       return a && b && oidcmp(a, b) == 0;
+       return a && b && oideq(a, b);
 }
 
 enum rename_type {
@@ -966,7 +966,7 @@ static int update_file_flags(struct merge_options *o,
                }
                if (S_ISREG(mode)) {
                        struct strbuf strbuf = STRBUF_INIT;
-                       if (convert_to_working_tree(path, buf, size, &strbuf)) {
+                       if (convert_to_working_tree(&the_index, path, buf, size, &strbuf)) {
                                free(buf);
                                size = strbuf.len;
                                buf = strbuf_detach(&strbuf, NULL);