projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup the x-allocation functions
[git.git]
/
rev-tree.c
diff --git
a/rev-tree.c
b/rev-tree.c
index
bfc8b12
..
c2909da
100644
(file)
--- a/
rev-tree.c
+++ b/
rev-tree.c
@@
-51,11
+51,11
@@
void process_commit(unsigned char *sha1)
struct commit_list *parents;
struct commit *obj = lookup_commit(sha1);
struct commit_list *parents;
struct commit *obj = lookup_commit(sha1);
- if (obj->object.parsed)
+ if (obj
&& obj
->object.parsed)
return;
return;
+ if (!obj || parse_commit(obj))
+ die("unable to parse commit (%s)", sha1_to_hex(sha1));
- parse_commit(obj);
-
parents = obj->parents;
while (parents) {
process_commit(parents->item->object.sha1);
parents = obj->parents;
while (parents) {
process_commit(parents->item->object.sha1);