fetch-pack.c: use oidset to check existence of loose object
[gitweb.git] / builtin / replace.c
index 303ca134dcc00131986a79c31f68dc6dcd70be0d..9f01f3fc7f86ef6e13933524441f330d3dae1573 100644 (file)
@@ -355,7 +355,7 @@ static void check_one_mergetag(struct commit *commit,
        struct tag *tag;
        int i;
 
-       hash_sha1_file(extra->value, extra->len, type_name(OBJ_TAG), tag_oid.hash);
+       hash_object_file(extra->value, extra->len, type_name(OBJ_TAG), &tag_oid);
        tag = lookup_tag(&tag_oid);
        if (!tag)
                die(_("bad mergetag in commit '%s'"), ref);
@@ -410,7 +410,7 @@ static int create_graft(int argc, const char **argv, int force)
 
        check_mergetags(commit, argc, argv);
 
-       if (write_sha1_file(buf.buf, buf.len, commit_type, new_oid.hash))
+       if (write_object_file(buf.buf, buf.len, commit_type, &new_oid))
                die(_("could not write replacement commit for: '%s'"), old_ref);
 
        strbuf_release(&buf);