summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-05-02 00:25:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-02 04:59:51 (GMT)
commit26ea3e7dca42266faa74f2080d28ecdd832d011d (patch)
tree91a069ca13d735b2a81537895c0c040267e53bb2 /commit.c
parent5d9e19824573782a9d4461b49bcd78b5faa79963 (diff)
downloadgit-26ea3e7dca42266faa74f2080d28ecdd832d011d.zip
git-26ea3e7dca42266faa74f2080d28ecdd832d011d.tar.gz
git-26ea3e7dca42266faa74f2080d28ecdd832d011d.tar.bz2
commit: convert uses of get_sha1_hex to get_oid_hex
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index ca474a7..9617f85 100644
--- a/commit.c
+++ b/commit.c
@@ -331,7 +331,7 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
if (tail <= bufptr + tree_entry_len + 1 || memcmp(bufptr, "tree ", 5) ||
bufptr[tree_entry_len] != '\n')
return error("bogus commit object %s", oid_to_hex(&item->object.oid));
- if (get_sha1_hex(bufptr + 5, parent.hash) < 0)
+ if (get_oid_hex(bufptr + 5, &parent) < 0)
return error("bad tree pointer in commit %s",
oid_to_hex(&item->object.oid));
item->tree = lookup_tree(&parent);
@@ -343,7 +343,7 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
struct commit *new_parent;
if (tail <= bufptr + parent_entry_len + 1 ||
- get_sha1_hex(bufptr + 7, parent.hash) ||
+ get_oid_hex(bufptr + 7, &parent) ||
bufptr[parent_entry_len] != '\n')
return error("bad parents in commit %s", oid_to_hex(&item->object.oid));
bufptr += parent_entry_len + 1;