In preparation to the day when we can deprecate and remove the
"rebase -p", make sure we can skip and later remove tests for
it.
* js/rebase-p-tests:
tests: optionally skip `git rebase -p` tests
t3418: decouple test cases from a previous `rebase -p` test case
t3404: decouple some test cases from outcomes of previous test cases
@ -397,6 +397,7 @@ test_expect_success 'edit ancestor with -p' '
@@ -397,6 +397,7 @@ test_expect_success 'edit ancestor with -p' '
'
test_expect_success '--continue tries to commit' '
git reset --hard D &&
test_tick &&
set_fake_editor &&
test_must_fail git rebase -i --onto new-branch1 HEAD^ &&
@ -436,7 +437,7 @@ test_expect_success C_LOCALE_OUTPUT 'multi-fixup does not fire up editor' '
@@ -436,7 +437,7 @@ test_expect_success C_LOCALE_OUTPUT 'multi-fixup does not fire up editor' '
git rebase -i $base &&
test $base = $(git rev-parse HEAD^) &&
test 0 = $(git show | grep NEVER | wc -l) &&
git checkout to-be-rebased &&
git checkout @{-1} &&
git branch -D multi-fixup
'
@ -451,7 +452,7 @@ test_expect_success 'commit message used after conflict' '
@@ -451,7 +452,7 @@ test_expect_success 'commit message used after conflict' '
@ -658,7 +659,7 @@ test_expect_success 'rebase with a file named HEAD in worktree' '
@@ -658,7 +659,7 @@ test_expect_success 'rebase with a file named HEAD in worktree' '
) &&
set_fake_editor &&
FAKE_LINES="1 squash 2" git rebase -i to-be-rebased &&
FAKE_LINES="1 squash 2" git rebase -i @{-1} &&
test "$(git show -s --pretty=format:%an)" = "Squashed Away"
@ -8,6 +8,11 @@ Run "git rebase -p" and check that merges are properly carried along
@@ -8,6 +8,11 @@ Run "git rebase -p" and check that merges are properly carried along
'
. ./test-lib.sh
if ! test_have_prereq REBASE_P; then
skip_all='skipping git rebase -p tests, as asked for'
@ -10,6 +10,11 @@ aren'"'"'t on top of $ONTO, even if they are on top of $UPSTREAM.
@@ -10,6 +10,11 @@ aren'"'"'t on top of $ONTO, even if they are on top of $UPSTREAM.
'
. ./test-lib.sh
if ! test_have_prereq REBASE_P; then
skip_all='skipping git rebase -p tests, as asked for'
@ -461,7 +461,8 @@ test_expect_success 'pull.rebase=1 is treated as true and flattens keep-merge' '
@@ -461,7 +461,8 @@ test_expect_success 'pull.rebase=1 is treated as true and flattens keep-merge' '
test file3 = "$(git show HEAD:file3.t)"
'
test_expect_success 'pull.rebase=preserve rebases and merges keep-merge' '
test_expect_success REBASE_P \
'pull.rebase=preserve rebases and merges keep-merge' '
@ -72,12 +72,14 @@ test_expect_success 'noop interactive rebase does not care about ident' '
@@ -72,12 +72,14 @@ test_expect_success 'noop interactive rebase does not care about ident' '
git rebase -i HEAD^
'
test_expect_success 'fast-forward rebase does not care about ident (preserve)' '
test_expect_success REBASE_P \
'fast-forward rebase does not care about ident (preserve)' '
git checkout -B tmp side-without-commit &&
git rebase -p master
'
test_expect_success 'non-fast-forward rebase refuses to write commits (preserve)' '
test_expect_success REBASE_P \
'non-fast-forward rebase refuses to write commits (preserve)' '
test_when_finished "git rebase --abort || true" &&