builtin/fsck: convert remaining caller of get_sha1 to object_id
[gitweb.git] / commit.c
index cbfd6899392e8715b206c96b3b58cbdaf29c77cd..e0888cf0f7ac609f015c8bb2748b3b66d1a25e3a 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -199,11 +199,11 @@ static void prepare_commit_graft(void)
        commit_graft_prepared = 1;
 }
 
-struct commit_graft *lookup_commit_graft(const unsigned char *sha1)
+struct commit_graft *lookup_commit_graft(const struct object_id *oid)
 {
        int pos;
        prepare_commit_graft();
-       pos = commit_graft_pos(sha1);
+       pos = commit_graft_pos(oid->hash);
        if (pos < 0)
                return NULL;
        return commit_graft[pos];
@@ -335,7 +335,7 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
        bufptr += tree_entry_len + 1; /* "tree " + "hex sha1" + "\n" */
        pptr = &item->parents;
 
-       graft = lookup_commit_graft(item->object.oid.hash);
+       graft = lookup_commit_graft(&item->object.oid);
        while (bufptr + parent_entry_len < tail && !memcmp(bufptr, "parent ", 7)) {
                struct commit *new_parent;