diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org.(none)> | 2005-04-19 09:52:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org.(none)> | 2005-04-19 09:52:24 -0700 |
commit | 3b7d368f34715003c834233d9f23456bcb62b44a (patch) | |
tree | c3963ca87888c3957622af0558c62e519fdd3b70 /rev-tree.c | |
parent | 0a9ea850005de0fb74b6288d281eb0417e869b00 (diff) | |
download | git-3b7d368f34715003c834233d9f23456bcb62b44a.tar.gz |
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.
Diffstat (limited to 'rev-tree.c')
-rw-r--r-- | rev-tree.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rev-tree.c b/rev-tree.c index c3884e3595..ebeceb070b 100644 --- a/rev-tree.c +++ b/rev-tree.c @@ -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; |