Skip to content

Commit dd605e4

Browse files
dschogitster
authored andcommitted
tests (rebase): spell out the --keep-empty option
This test wants to run `git rebase` with the `--keep-empty` option, but it really only spelled out `--keep` and trusted Git's option parsing to determine that this was a unique abbreviation of the real option. However, Denton Liu contributed a patch series in https://public-inbox.org/git/[email protected]/ that introduces a new `git rebase` option called `--keep-base`, which makes this previously unique abbreviation non-unique. Whether this patch series is accepted or not, it is actually a bad practice to use abbreviated options in our test suite, because of the issue that those unique option names are not guaranteed to stay unique in the future. So let's just not use abbreviated options in the test suite. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 041f5ea commit dd605e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t5407-post-rewrite-hook.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ test_expect_success 'git rebase -m --skip' '
131131
test_expect_success 'git rebase with implicit use of interactive backend' '
132132
git reset --hard D &&
133133
clear_hook_input &&
134-
test_must_fail git rebase --keep --onto A B &&
134+
test_must_fail git rebase --keep-empty --onto A B &&
135135
echo C > foo &&
136136
git add foo &&
137137
git rebase --continue &&
@@ -146,7 +146,7 @@ test_expect_success 'git rebase with implicit use of interactive backend' '
146146
test_expect_success 'git rebase --skip with implicit use of interactive backend' '
147147
git reset --hard D &&
148148
clear_hook_input &&
149-
test_must_fail git rebase --keep --onto A B &&
149+
test_must_fail git rebase --keep-empty --onto A B &&
150150
test_must_fail git rebase --skip &&
151151
echo D > foo &&
152152
git add foo &&

0 commit comments

Comments
 (0)