summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c13c6bf)
raw | patch | inline | side by side (parent: c13c6bf)
author | Matthias Urlichs <smurf@smurf.noris.de> | |
Thu, 9 Mar 2006 04:04:36 +0000 (05:04 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 9 Mar 2006 09:49:07 +0000 (01:49 -0800) |
revision.c:make_parents_uninteresting() is exponential with the number
of merges in the tree. That's fine -- unless some other part of git
already has pulled the whole commit tree into memory ...
Signed-off-by: Junio C Hamano <junkio@cox.net>
of merges in the tree. That's fine -- unless some other part of git
already has pulled the whole commit tree into memory ...
Signed-off-by: Junio C Hamano <junkio@cox.net>
revision.c | patch | blob | history |
diff --git a/revision.c b/revision.c
index 2a33637f62878f225c4eb74fbbd2ed5272cc36bb..713f27e3ce2b8b3491e20720f7dba2c641b4422a 100644 (file)
--- a/revision.c
+++ b/revision.c
while (parents) {
struct commit *commit = parents->item;
- commit->object.flags |= UNINTERESTING;
-
- /*
- * Normally we haven't parsed the parent
- * yet, so we won't have a parent of a parent
- * here. However, it may turn out that we've
- * reached this commit some other way (where it
- * wasn't uninteresting), in which case we need
- * to mark its parents recursively too..
- */
- if (commit->parents)
- mark_parents_uninteresting(commit);
+ if (!(commit->object.flags & UNINTERESTING)) {
+ commit->object.flags |= UNINTERESTING;
+
+ /*
+ * Normally we haven't parsed the parent
+ * yet, so we won't have a parent of a parent
+ * here. However, it may turn out that we've
+ * reached this commit some other way (where it
+ * wasn't uninteresting), in which case we need
+ * to mark its parents recursively too..
+ */
+ if (commit->parents)
+ mark_parents_uninteresting(commit);
+ }
/*
* A missing commit is ok iff its parent is marked