summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-11 13:26:55 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-11 13:26:55 -0700
commit3943f6caaa7613145448ebdca181e1feaf941a02 (patch)
treef323116aa615c2a60cf57f9faed3435dd8a4a870 /commit.c
parent4274c698f46a9bc45834c4904e7e113450c042fb (diff)
parent84571760ca96d244e4fff06819fab119947d792e (diff)
downloadgit-3943f6caaa7613145448ebdca181e1feaf941a02.tar.gz
Merge branch 'sb/object-id'
Conversion from uchar[20] to struct object_id continues. * sb/object-id: tag: convert gpg_verify_tag to use struct object_id commit: convert lookup_commit_graft to struct object_id
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/commit.c b/commit.c
index cbfd689939..e0888cf0f7 100644
--- 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;