diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-08-14 13:52:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-18 00:39:47 -0700 |
commit | 5eac739e05620e491555850d5b513ef60595c016 (patch) | |
tree | 8403e624c02e0e5764aae408f5365bdd472f4bcb /revision.c | |
parent | 53030f8d1199ef9da86e7ddc2b8a659a355e5f69 (diff) | |
download | git-5eac739e05620e491555850d5b513ef60595c016.tar.gz |
revision --simplify-merges: make it a no-op without pathspec
When we are not pruning there is no reason to run the merge
simplification.
Also avoid running topo-order sort twice.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/revision.c b/revision.c index 8cd39da2ef..db2ab2b11a 100644 --- a/revision.c +++ b/revision.c @@ -1518,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; |