builtin-am: extract patch and commit info with git-mailinfo
[gitweb.git] / replace_object.c
index 0ab2dc137487259d50b69258e967792aa6c43619..f0b39f06d5dabc3c98c5c083458736a585b4cabb 100644 (file)
@@ -53,7 +53,7 @@ static int register_replace_object(struct replace_object *replace,
 }
 
 static int register_replace_ref(const char *refname,
-                               const unsigned char *sha1,
+                               const struct object_id *oid,
                                int flag, void *cb_data)
 {
        /* Get sha1 from refname */
@@ -68,7 +68,7 @@ static int register_replace_ref(const char *refname,
        }
 
        /* Copy sha1 from the read ref */
-       hashcpy(repl_obj->replacement, sha1);
+       hashcpy(repl_obj->replacement, oid->hash);
 
        /* Register new object */
        if (register_replace_object(repl_obj, 1))