Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
revision: "simplify" options imply topo-order sort
author
Junio C Hamano
<gitster@pobox.com>
Fri, 8 Jun 2012 21:47:08 +0000
(14:47 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 8 Jun 2012 21:47:08 +0000
(14:47 -0700)
The code internally runs sort_in_topo_order() already; it is more clear
to spell it out in the option parsing phase, instead of adding a special
case in simplify_merges() function.
revision.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
02101c9
)
diff --git
a/revision.c
b/revision.c
index 935e7a7ba413668c95a6c3e846b9058be07f0425..00aaefe88580e618ffe4d8630dc70ca3e711547d 100644
(file)
--- a/
revision.c
+++ b/
revision.c
@@
-1358,11
+1358,13
@@
static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->topo_order = 1;
} else if (!strcmp(arg, "--simplify-merges")) {
revs->simplify_merges = 1;
revs->topo_order = 1;
} else if (!strcmp(arg, "--simplify-merges")) {
revs->simplify_merges = 1;
+ revs->topo_order = 1;
revs->rewrite_parents = 1;
revs->simplify_history = 0;
revs->limited = 1;
} else if (!strcmp(arg, "--simplify-by-decoration")) {
revs->simplify_merges = 1;
revs->rewrite_parents = 1;
revs->simplify_history = 0;
revs->limited = 1;
} else if (!strcmp(arg, "--simplify-by-decoration")) {
revs->simplify_merges = 1;
+ revs->topo_order = 1;
revs->rewrite_parents = 1;
revs->simplify_history = 0;
revs->simplify_by_decoration = 1;
revs->rewrite_parents = 1;
revs->simplify_history = 0;
revs->simplify_by_decoration = 1;
@@
-2016,8
+2018,6
@@
static void simplify_merges(struct rev_info *revs)
struct commit_list *list;
struct commit_list *yet_to_do, **tail;
struct commit_list *list;
struct commit_list *yet_to_do, **tail;
- if (!revs->topo_order)
- sort_in_topological_order(&revs->commits, revs->lifo);
if (!revs->prune)
return;
if (!revs->prune)
return;