projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a9ea85
)
Don't parse commit objects more than once.
author
Linus Torvalds
<torvalds@ppc970.osdl.org.(none)>
Tue, 19 Apr 2005 16:52:24 +0000
(09:52 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org.(none)>
Tue, 19 Apr 2005 16:52:24 +0000
(09:52 -0700)
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.
rev-tree.c
patch
|
blob
|
history
diff --git
a/rev-tree.c
b/rev-tree.c
index
c3884e3
..
ebeceb0
100644
(file)
--- 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;