Skip to content

Commit 8996d68

Browse files
committed
Merge branch 'ps/connectivity-optim'
Regression fix. * ps/connectivity-optim: Revert "connected: do not sort input revisions"
2 parents 4d53e91 + a7df4f5 commit 8996d68

File tree

4 files changed

+1
-48
lines changed

4 files changed

+1
-48
lines changed

Documentation/rev-list-options.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -968,20 +968,14 @@ list of the missing objects. Object IDs are prefixed with a ``?'' character.
968968
objects.
969969
endif::git-rev-list[]
970970

971-
--unsorted-input::
972-
Show commits in the order they were given on the command line instead
973-
of sorting them in reverse chronological order by commit time. Cannot
974-
be combined with `--no-walk` or `--no-walk=sorted`.
975-
976971
--no-walk[=(sorted|unsorted)]::
977972
Only show the given commits, but do not traverse their ancestors.
978973
This has no effect if a range is specified. If the argument
979974
`unsorted` is given, the commits are shown in the order they were
980975
given on the command line. Otherwise (if `sorted` or no argument
981976
was given), the commits are shown in reverse chronological order
982977
by commit time.
983-
Cannot be combined with `--graph`. Cannot be combined with
984-
`--unsorted-input` if `sorted` or no argument was given.
978+
Cannot be combined with `--graph`.
985979

986980
--do-walk::
987981
Overrides a previous `--no-walk`.

connected.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ int check_connected(oid_iterate_fn fn, void *cb_data,
107107
if (opt->progress)
108108
strvec_pushf(&rev_list.args, "--progress=%s",
109109
_("Checking connectivity"));
110-
strvec_push(&rev_list.args, "--unsorted-input");
111110

112111
rev_list.git_cmd = 1;
113112
rev_list.env = opt->env;

revision.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,10 +2254,6 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
22542254
} else if (!strcmp(arg, "--author-date-order")) {
22552255
revs->sort_order = REV_SORT_BY_AUTHOR_DATE;
22562256
revs->topo_order = 1;
2257-
} else if (!strcmp(arg, "--unsorted-input")) {
2258-
if (revs->no_walk)
2259-
die(_("--unsorted-input is incompatible with --no-walk"));
2260-
revs->unsorted_input = 1;
22612257
} else if (!strcmp(arg, "--early-output")) {
22622258
revs->early_output = 100;
22632259
revs->topo_order = 1;
@@ -2651,13 +2647,8 @@ static int handle_revision_pseudo_opt(struct rev_info *revs,
26512647
} else if (!strcmp(arg, "--not")) {
26522648
*flags ^= UNINTERESTING | BOTTOM;
26532649
} else if (!strcmp(arg, "--no-walk")) {
2654-
if (!revs->no_walk && revs->unsorted_input)
2655-
die(_("--no-walk is incompatible with --unsorted-input"));
26562650
revs->no_walk = 1;
26572651
} else if (skip_prefix(arg, "--no-walk=", &optarg)) {
2658-
if (!revs->no_walk && revs->unsorted_input)
2659-
die(_("--no-walk is incompatible with --unsorted-input"));
2660-
26612652
/*
26622653
* Detached form ("--no-walk X" as opposed to "--no-walk=X")
26632654
* not allowed, since the argument is optional.

t/t6000-rev-list-misc.sh

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -169,35 +169,4 @@ test_expect_success 'rev-list --count --objects' '
169169
test_line_count = $count actual
170170
'
171171

172-
test_expect_success 'rev-list --unsorted-input results in different sorting' '
173-
git rev-list --unsorted-input HEAD HEAD~ >first &&
174-
git rev-list --unsorted-input HEAD~ HEAD >second &&
175-
! test_cmp first second &&
176-
sort first >first.sorted &&
177-
sort second >second.sorted &&
178-
test_cmp first.sorted second.sorted
179-
'
180-
181-
test_expect_success 'rev-list --unsorted-input incompatible with --no-walk' '
182-
cat >expect <<-EOF &&
183-
fatal: --no-walk is incompatible with --unsorted-input
184-
EOF
185-
test_must_fail git rev-list --unsorted-input --no-walk HEAD 2>error &&
186-
test_cmp expect error &&
187-
test_must_fail git rev-list --unsorted-input --no-walk=sorted HEAD 2>error &&
188-
test_cmp expect error &&
189-
test_must_fail git rev-list --unsorted-input --no-walk=unsorted HEAD 2>error &&
190-
test_cmp expect error &&
191-
192-
cat >expect <<-EOF &&
193-
fatal: --unsorted-input is incompatible with --no-walk
194-
EOF
195-
test_must_fail git rev-list --no-walk --unsorted-input HEAD 2>error &&
196-
test_cmp expect error &&
197-
test_must_fail git rev-list --no-walk=sorted --unsorted-input HEAD 2>error &&
198-
test_cmp expect error &&
199-
test_must_fail git rev-list --no-walk=unsorted --unsorted-input HEAD 2>error &&
200-
test_cmp expect error
201-
'
202-
203172
test_done

0 commit comments

Comments
 (0)