Merge branch 'sg/doc-test-must-fail-args'
[gitweb.git] / builtin / replace.c
index 814bf6bfdead377b9294611c2fea74a5f35636b7..83d3235721470167d362f64763745d8fb9852d7b 100644 (file)
@@ -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.hash))
+       if (write_object_file(buf.buf, buf.len, commit_type, &new))
                die(_("could not write replacement commit for: '%s'"), old_ref);
 
        strbuf_release(&buf);