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:
brian m. carlson 2018-05-02 00:25:47 +00:00 коммит произвёл Junio C Hamano
Родитель 5d9e198245
Коммит 26ea3e7dca
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;