rev-tree now handles commit problems better
This fixes possible crashes in case of broken commit tree, and makes rev-tree die in case it cannot parse a given commit.
This commit is contained in:
parent
1c9da46da4
commit
06cd3b94b2
@ -51,10 +51,10 @@ void process_commit(unsigned char *sha1)
|
|||||||
struct commit_list *parents;
|
struct commit_list *parents;
|
||||||
struct commit *obj = lookup_commit(sha1);
|
struct commit *obj = lookup_commit(sha1);
|
||||||
|
|
||||||
if (obj->object.parsed)
|
if (obj && obj->object.parsed)
|
||||||
return;
|
return;
|
||||||
|
if (!obj || parse_commit(obj))
|
||||||
parse_commit(obj);
|
die("unable to parse commit (%s)", sha1_to_hex(sha1));
|
||||||
|
|
||||||
parents = obj->parents;
|
parents = obj->parents;
|
||||||
while (parents) {
|
while (parents) {
|
||||||
|
Loading…
Reference in New Issue
Block a user