rev-parse: let some options run outside repository
[gitweb.git] / builtin / commit-tree.c
index 8747c0f2fbe6426b97571bd29df0892efd1fa810..3feeffeab1ccd51a5e30098c31b4daa62e7ef684 100644 (file)
@@ -16,11 +16,11 @@ static const char *sign_commit;
 
 static void new_parent(struct commit *parent, struct commit_list **parents_p)
 {
-       unsigned char *sha1 = parent->object.sha1;
+       struct object_id *oid = &parent->object.oid;
        struct commit_list *parents;
        for (parents = *parents_p; parents; parents = parents->next) {
                if (parents->item == parent) {
-                       error("duplicate parent %s ignored", sha1_to_hex(sha1));
+                       error("duplicate parent %s ignored", oid_to_hex(oid));
                        return;
                }
                parents_p = &parents->next;