Don't parse commit objects more than once.

Yes, the "parse_commit()" already checks for this condition, but
we need to check for it in rev-tree too, so that we don't start
walking the parent chain unnecessarily.
This commit is contained in:
Linus Torvalds 2005-04-19 09:52:24 -07:00
parent 0a9ea85000
commit 3b7d368f34

View file

@ -55,6 +55,10 @@ void process_commit(unsigned char *sha1)
{
struct commit_list *parents;
struct commit *obj = lookup_commit(sha1);
if (obj->object.parsed)
return;
parse_commit(obj);
parents = obj->parents;