mirror of
https://github.com/git/git.git
synced 2026-04-12 01:40:10 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user