The `--preserve-merges` mode of the `rebase` command is slated to be
deprecated soon, as the more powerful `--rebase-merges` mode is
available now, and the latter was designed with the express intent to
address the shortcomings of `--preserve-merges`' design (e.g. the
inability to reorder commits in an interactive rebase).
As such, we will eventually even remove the `--preserve-merges` support,
and along with it, its tests.
In preparation for this, and also to allow the Windows phase of our
automated tests to save some well-needed time when running the test
suite, this commit introduces a new prerequisite REBASE_P, which can be
forced to being unmet by setting the environment variable
`GIT_TEST_SKIP_REBASE_P` to any non-empty string.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Johannes Schindelin6 years agocommitted byJunio C Hamano
@ -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" &&