summaryrefslogtreecommitdiff
path: root/rev-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'rev-list.c')
-rw-r--r--rev-list.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/rev-list.c b/rev-list.c
index 309070f..846aa2f 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -228,6 +228,17 @@ static void mark_parents_uninteresting(struct commit *commit)
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
* uninteresting.
*