Revert "Make left-right automatic."
This reverts commit 5761231975ceffa531d86d9bab0f9a9a370674f6. Feeding symmetric difference to gitk is so useful, and it is the same for other graphical Porcelains. Rather than forcing them to pass --no-left-right, making it optional. Noticed and reported by Jeff King.
Junio C Hamano committed
Dec 19, 2006 at 02:28 UTC
8dce82356221df894a1b0dd5a4189ad3169a5069
2 files changed
+3
-11
revision.c
+3
-10
@@ -853,8 +853,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
853
revs->boundary = 1;
854
continue;
855
}
856
- if (!strcmp(arg, "--no-left-right")) {
857
- revs->no_left_right = 1;
856
+ if (!strcmp(arg, "--left-right")) {
857
+ revs->left_right = 1;
858
continue;
859
}
860
if (!strcmp(arg, "--objects")) {
@@ -1055,18 +1055,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
1055
void prepare_revision_walk(struct rev_info *revs)
1056
{
1057
int nr = revs->pending.nr;
1058
- int has_symmetric = 0;
1058
struct object_array_entry *list = revs->pending.objects;
1059
1060
revs->pending.nr = 0;
1061
revs->pending.alloc = 0;
1062
revs->pending.objects = NULL;
1063
while (--nr >= 0) {
1065
- struct commit *commit;
1066
-
1067
- if (list->item->flags & SYMMETRIC_LEFT)
1068
- has_symmetric = 1;
1069
- commit = handle_commit(revs, list->item, list->name);
1064
+ struct commit *commit = handle_commit(revs, list->item, list->name);
1065
if (commit) {
1066
if (!(commit->object.flags & SEEN)) {
1067
commit->object.flags |= SEEN;
@@ -1078,8 +1073,6 @@ void prepare_revision_walk(struct rev_info *revs)
1073
1074
if (revs->no_walk)
1075
return;
1081
- if (!revs->no_left_right && has_symmetric)
1082
- revs->left_right = 1;
1076
if (revs->limited)
1077
limit_list(revs);
1078
if (revs->topo_order)
revision.h
-1
@@ -41,7 +41,6 @@ struct rev_info {
41
limited:1,
42
unpacked:1, /* see also ignore_packed below */
43
boundary:1,
44
- no_left_right:1,
44
left_right:1,
45
parents:1;
46