Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
commit: convert uses of get_sha1_hex to get_oid_hex
author
brian m. carlson
<sandals@crustytoothpaste.net>
Wed, 2 May 2018 00:25:47 +0000
(
00:25
+0000)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 2 May 2018 04:59:51 +0000
(13:59 +0900)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
5d9e198
)
diff --git
a/commit.c
b/commit.c
index ca474a7c112855a49b77cce7cdfb83937fa17fae..9617f85caaca8ab2a332fee4ed29c1f373c6cabe 100644
(file)
--- 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 (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);
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 ||
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;
bufptr[parent_entry_len] != '\n')
return error("bad parents in commit %s", oid_to_hex(&item->object.oid));
bufptr += parent_entry_len + 1;