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>
This commit is contained in:

committed by
Junio C Hamano

parent
5d9e198245
commit
26ea3e7dca
4
commit.c
4
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) ||
|
if (tail <= bufptr + tree_entry_len + 1 || memcmp(bufptr, "tree ", 5) ||
|
||||||
bufptr[tree_entry_len] != '\n')
|
bufptr[tree_entry_len] != '\n')
|
||||||
return error("bogus commit object %s", oid_to_hex(&item->object.oid));
|
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",
|
return error("bad tree pointer in commit %s",
|
||||||
oid_to_hex(&item->object.oid));
|
oid_to_hex(&item->object.oid));
|
||||||
item->tree = lookup_tree(&parent);
|
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;
|
struct commit *new_parent;
|
||||||
|
|
||||||
if (tail <= bufptr + parent_entry_len + 1 ||
|
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')
|
bufptr[parent_entry_len] != '\n')
|
||||||
return error("bad parents in commit %s", oid_to_hex(&item->object.oid));
|
return error("bad parents in commit %s", oid_to_hex(&item->object.oid));
|
||||||
bufptr += parent_entry_len + 1;
|
bufptr += parent_entry_len + 1;
|
||||||
|
Reference in New Issue
Block a user