Code

revision --simplify-merges: do not leave commits unprocessed
authorJunio C Hamano <gitster@pobox.com>
Mon, 18 Aug 2008 07:37:34 +0000 (00:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Aug 2008 07:37:34 +0000 (00:37 -0700)
When we still do not know how parents of a commit simplify to, we should
defer processing of the commit, not discard it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c

index 33cb207f281f97f0eb1c24dd0b5200feda49848d..8cd39da2effa144721851097afe6d503e3c255e1 100644 (file)
@@ -1459,8 +1459,10 @@ static struct commit_list **simplify_one(struct rev_info *revs, struct commit *c
                        cnt++;
                }
        }
-       if (cnt)
+       if (cnt) {
+               tail = &commit_list_insert(commit, tail)->next;
                return tail;
+       }
 
        /*
         * Rewrite our list of parents.