diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2018-05-02 00:25:47 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-02 13:59:51 +0900 |
commit | 26ea3e7dca42266faa74f2080d28ecdd832d011d (patch) | |
tree | 91a069ca13d735b2a81537895c0c040267e53bb2 /commit.c | |
parent | 5d9e19824573782a9d4461b49bcd78b5faa79963 (diff) | |
download | git-26ea3e7dca42266faa74f2080d28ecdd832d011d.tar.gz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |