]> asedeno.scripts.mit.edu Git - git.git/blobdiff - revision.c
Merge branch 'jc/post-simplify' (early part) into tr/filter-branch
[git.git] / revision.c
index 33cb207f281f97f0eb1c24dd0b5200feda49848d..db2ab2b11a39c295373488f6ff28c1340a9a666d 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.
@@ -1516,7 +1518,10 @@ static void simplify_merges(struct rev_info *revs)
        struct commit_list *list;
        struct commit_list *yet_to_do, **tail;
 
-       sort_in_topological_order(&revs->commits, revs->lifo);
+       if (!revs->topo_order)
+               sort_in_topological_order(&revs->commits, revs->lifo);
+       if (!revs->prune)
+               return;
 
        /* feed the list reversed */
        yet_to_do = NULL;