diff: convert prep_temp_blob() to struct object_id
[gitweb.git] / merge-recursive.c
index 7bbd4aea69a7fdd038da56b44397f339a0641bd0..48fe7e738668e306127c4fad9348da2706950560 100644 (file)
@@ -1982,11 +1982,11 @@ int merge_recursive(struct merge_options *o,
        return clean;
 }
 
-static struct commit *get_ref(const unsigned char *sha1, const char *name)
+static struct commit *get_ref(const struct object_id *oid, const char *name)
 {
        struct object *object;
 
-       object = deref_tag(parse_object(sha1), name, strlen(name));
+       object = deref_tag(parse_object(oid->hash), name, strlen(name));
        if (!object)
                return NULL;
        if (object->type == OBJ_TREE)
@@ -1999,10 +1999,10 @@ static struct commit *get_ref(const unsigned char *sha1, const char *name)
 }
 
 int merge_recursive_generic(struct merge_options *o,
-                           const unsigned char *head,
-                           const unsigned char *merge,
+                           const struct object_id *head,
+                           const struct object_id *merge,
                            int num_base_list,
-                           const unsigned char **base_list,
+                           const struct object_id **base_list,
                            struct commit **result)
 {
        int clean;
@@ -2015,9 +2015,9 @@ int merge_recursive_generic(struct merge_options *o,
                int i;
                for (i = 0; i < num_base_list; ++i) {
                        struct commit *base;
-                       if (!(base = get_ref(base_list[i], sha1_to_hex(base_list[i]))))
+                       if (!(base = get_ref(base_list[i], oid_to_hex(base_list[i]))))
                                return error(_("Could not parse object '%s'"),
-                                       sha1_to_hex(base_list[i]));
+                                       oid_to_hex(base_list[i]));
                        commit_list_insert(base, &ca);
                }
        }