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>
brian m. carlson committed
May 2, 2018 at 00:25 UTC
26ea3e7dca42266faa74f2080d28ecdd832d011d
1 file changed
+2
-2
commit.c
+2
-2
@@ -331,7 +331,7 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
331
if (tail <= bufptr + tree_entry_len + 1 || memcmp(bufptr, "tree ", 5) ||
332
bufptr[tree_entry_len] != '\n')
333
return error("bogus commit object %s", oid_to_hex(&item->object.oid));
334
- if (get_sha1_hex(bufptr + 5, parent.hash) < 0)
334
+ if (get_oid_hex(bufptr + 5, &parent) < 0)
335
return error("bad tree pointer in commit %s",
336
oid_to_hex(&item->object.oid));
337
item->tree = lookup_tree(&parent);
@@ -343,7 +343,7 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
343
struct commit *new_parent;
344
345
if (tail <= bufptr + parent_entry_len + 1 ||
346
- get_sha1_hex(bufptr + 7, parent.hash) ||
346
+ get_oid_hex(bufptr + 7, &parent) ||
347
bufptr[parent_entry_len] != '\n')
348
return error("bad parents in commit %s", oid_to_hex(&item->object.oid));
349
bufptr += parent_entry_len + 1;