{"thread":{"id":"49726","subject":"[PATCH 0/3] tests: allow to skip git rebase -p tests","startedAt":"2018-10-31T20:02:01Z","lastAt":"2018-11-01T23:46:01Z","messageCount":7,"participants":["Johannes Schindelin via GitGitGadget","Junio C Hamano","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"362123","messageId":"pull.63.git.gitgitgadget@gmail.com","threadId":"49726","inReplyTo":null,"subject":"[PATCH 0/3] tests: allow to skip git rebase -p tests","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-31T20:01:57Z","receivedAt":"2018-10-31T20:02:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"The --preserve-merges mode of the git rebase command is on its way out,\nbeing superseded by the --rebase-merges mode. My plan is to contribute\npatches to deprecate the former in favor of the latter before long.\n\nIn the meantime, it seems a bit pointless to keep running the git rebase -p \ntests, in particular in the Windows phase of the automated testing. In\npreparation for skipping those tests, this patch series starts out by\ndecoupling test cases so that no non-rebase -p ones depend on side effects\nof rebase -p ones, and it concludes by a patch that allows skipping the \nrebase -p ones by setting the environment variable GIT_TEST_SKIP_REBASE_P.\n\nIn a quick 'n dirty test, skipping the rebase -p tests seems to shave off\nabout 8 minutes from the 1h20 running time of the test suite on Windows\n(without git svn tests, we skip them for a long time already, as they are\nreally, really slow on Windows).\n\nJohannes Schindelin (3):\n  t3404: decouple some test cases from outcomes of previous test cases\n  t3418: decouple test cases from a previous `rebase -p` test case\n  tests: optionally skip `git rebase -p` tests\n\n t/t3404-rebase-interactive.sh             | 23 ++++++++-------\n t/t3408-rebase-multi-line.sh              |  2 +-\n t/t3409-rebase-preserve-merges.sh         |  5 ++++\n t/t3410-rebase-preserve-dropped-merges.sh |  5 ++++\n t/t3411-rebase-preserve-around-merges.sh  |  5 ++++\n t/t3412-rebase-root.sh                    | 12 ++++----\n t/t3414-rebase-preserve-onto.sh           |  5 ++++\n t/t3418-rebase-continue.sh                |  5 ++--\n t/t3421-rebase-topology-linear.sh         | 36 +++++++++++------------\n t/t3425-rebase-topology-merges.sh         |  5 ++++\n t/t5520-pull.sh                           |  6 ++--\n t/t7505-prepare-commit-msg-hook.sh        |  2 +-\n t/t7517-per-repo-email.sh                 |  6 ++--\n t/test-lib.sh                             |  4 +++\n 14 files changed, 78 insertions(+), 43 deletions(-)\n\n\nbase-commit: 4ede3d42dfb57f9a41ac96a1f216c62eb7566cc2\nPublished-As: https://github.com/gitgitgadget/git/releases/tags/pr-63%2Fdscho%2Fsplit-out-rebase-p-tests-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-63/dscho/split-out-rebase-p-tests-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/63\n-- \ngitgitgadget\n"},{"id":"362124","messageId":"02e1de43eb0f51d272422177db378d1d4b6bad1e.1541016114.git.gitgitgadget@gmail.com","threadId":"49726","inReplyTo":"pull.63.git.gitgitgadget@gmail.com","subject":"[PATCH 1/3] t3404: decouple some test cases from outcomes of previous test cases","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-31T20:01:59Z","receivedAt":"2018-10-31T20:02:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nOriginally, the `--preserve-merges` option of the `git rebase` command\npiggy-backed on top of the `--interactive` feature. For that reason, the\nearly test cases were added to the very same test script that contains\nthe `git rebase -i` tests: `t3404-rebase-interactive.sh`.\n\nHowever, since c42abfe7857 (rebase: introduce a dedicated backend for\n--preserve-merges, 2018-05-28), the `--preserve-merges` feature got its\nown backend, in preparation for converting the rest of the\n`--interactive` code to built-in code, written in C rather than shell.\n\nThe reason why the `--preserve-merges` feature was not converted at the\nsame time is that we have something much better now: `--rebase-merges`.\nThat option intends to supersede `--preserve-merges`, and we will\nprobably deprecate the latter soon.\n\nOnce `--preserve-merges` has been deprecated for a good amount of time,\nit will be time to remove it, and along with it, its tests.\n\nIn preparation for that, let's make the rest of the test cases in\n`t3404-rebase-interactive.sh` independent of the test cases dedicated to\n`--preserve-merges`.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3404-rebase-interactive.sh | 15 ++++++++-------\n 1 file changed, 8 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex ff89b6341a..99d1fb79a8 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -387,6 +387,7 @@ test_expect_success 'edit ancestor with -p' '\n '\n \n test_expect_success '--continue tries to commit' '\n+\tgit reset --hard D &&\n \ttest_tick &&\n \tset_fake_editor &&\n \ttest_must_fail git rebase -i --onto new-branch1 HEAD^ &&\n@@ -426,7 +427,7 @@ test_expect_success C_LOCALE_OUTPUT 'multi-fixup does not fire up editor' '\n \t\tgit rebase -i $base &&\n \ttest $base = $(git rev-parse HEAD^) &&\n \ttest 0 = $(git show | grep NEVER | wc -l) &&\n-\tgit checkout to-be-rebased &&\n+\tgit checkout @{-1} &&\n \tgit branch -D multi-fixup\n '\n \n@@ -441,7 +442,7 @@ test_expect_success 'commit message used after conflict' '\n \t\tgit rebase --continue &&\n \ttest $base = $(git rev-parse HEAD^) &&\n \ttest 1 = $(git show | grep ONCE | wc -l) &&\n-\tgit checkout to-be-rebased &&\n+\tgit checkout @{-1} &&\n \tgit branch -D conflict-fixup\n '\n \n@@ -456,7 +457,7 @@ test_expect_success 'commit message retained after conflict' '\n \t\tgit rebase --continue &&\n \ttest $base = $(git rev-parse HEAD^) &&\n \ttest 2 = $(git show | grep TWICE | wc -l) &&\n-\tgit checkout to-be-rebased &&\n+\tgit checkout @{-1} &&\n \tgit branch -D conflict-squash\n '\n \n@@ -481,7 +482,7 @@ test_expect_success C_LOCALE_OUTPUT 'squash and fixup generate correct log messa\n \t\tgrep \"^# This is a combination of 3 commits\\.\"  &&\n \tgit cat-file commit HEAD@{3} |\n \t\tgrep \"^# This is a combination of 2 commits\\.\"  &&\n-\tgit checkout to-be-rebased &&\n+\tgit checkout @{-1} &&\n \tgit branch -D squash-fixup\n '\n \n@@ -494,7 +495,7 @@ test_expect_success C_LOCALE_OUTPUT 'squash ignores comments' '\n \t\tgit rebase -i $base &&\n \ttest $base = $(git rev-parse HEAD^) &&\n \ttest 1 = $(git show | grep ONCE | wc -l) &&\n-\tgit checkout to-be-rebased &&\n+\tgit checkout @{-1} &&\n \tgit branch -D skip-comments\n '\n \n@@ -507,7 +508,7 @@ test_expect_success C_LOCALE_OUTPUT 'squash ignores blank lines' '\n \t\tgit rebase -i $base &&\n \ttest $base = $(git rev-parse HEAD^) &&\n \ttest 1 = $(git show | grep ONCE | wc -l) &&\n-\tgit checkout to-be-rebased &&\n+\tgit checkout @{-1} &&\n \tgit branch -D skip-blank-lines\n '\n \n@@ -648,7 +649,7 @@ test_expect_success 'rebase with a file named HEAD in worktree' '\n \t) &&\n \n \tset_fake_editor &&\n-\tFAKE_LINES=\"1 squash 2\" git rebase -i to-be-rebased &&\n+\tFAKE_LINES=\"1 squash 2\" git rebase -i @{-1} &&\n \ttest \"$(git show -s --pretty=format:%an)\" = \"Squashed Away\"\n \n '\n-- \ngitgitgadget\n\n"},{"id":"362125","messageId":"f7d7892a48a90b54f466569ac220cb2c9e319806.1541016115.git.gitgitgadget@gmail.com","threadId":"49726","inReplyTo":"pull.63.git.gitgitgadget@gmail.com","subject":"[PATCH 2/3] t3418: decouple test cases from a previous `rebase -p` test case","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-31T20:02:00Z","receivedAt":"2018-10-31T20:02:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIt is in general a good idea for regression test cases to be as\nindependent of each other as possible (with the one exception of an\ninitial `setup` test case, which is only a test case in Git's test suite\nbecause it does not have a notion of a fixture or setup).\n\nThis patch addresses one particular instance of this principle being\nviolated: a few test cases in t3418-rebase-continue.sh depend on a side\neffect of a test case that verifies a specific `rebase -p` behavior. The\nlater test cases should, however, still succeed even if the `rebase -p`\ntest case is skipped.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3418-rebase-continue.sh | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh\nindex 25099d715c..031e3d8ddb 100755\n--- a/t/t3418-rebase-continue.sh\n+++ b/t/t3418-rebase-continue.sh\n@@ -177,6 +177,7 @@ test_expect_success 'setup rerere database' '\n \tgit checkout master &&\n \ttest_commit \"commit-new-file-F3\" F3 3 &&\n \ttest_config rerere.enabled true &&\n+\tgit update-ref refs/heads/topic commit-new-file-F3-on-topic-branch &&\n \ttest_must_fail git rebase -m master topic &&\n \techo \"Resolved\" >F2 &&\n \tcp F2 expected-F2 &&\n-- \ngitgitgadget\n\n"},{"id":"362126","messageId":"39734e4805cbd695cd69e7c1a3016de629ac9b3c.1541016115.git.gitgitgadget@gmail.com","threadId":"49726","inReplyTo":"pull.63.git.gitgitgadget@gmail.com","subject":"[PATCH 3/3] tests: optionally skip `git rebase -p` tests","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-31T20:02:02Z","receivedAt":"2018-10-31T20:02:05Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe `--preserve-merges` mode of the `rebase` command is slated to be\ndeprecated soon, as the more powerful `--rebase-merges` mode is\navailable now, and the latter was designed with the express intent to\naddress the shortcomings of `--preserve-merges`' design (e.g. the\ninability to reorder commits in an interactive rebase).\n\nAs such, we will eventually even remove the `--preserve-merges` support,\nand along with it, its tests.\n\nIn preparation for this, and also to allow the Windows phase of our\nautomated tests to save some well-needed time when running the test\nsuite, this commit introduces a new prerequisite REBASE_P, which can be\nforced to being unmet by setting the environment variable\n`GIT_TEST_SKIP_REBASE_P` to any non-empty string.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3404-rebase-interactive.sh             |  8 ++---\n t/t3408-rebase-multi-line.sh              |  2 +-\n t/t3409-rebase-preserve-merges.sh         |  5 ++++\n t/t3410-rebase-preserve-dropped-merges.sh |  5 ++++\n t/t3411-rebase-preserve-around-merges.sh  |  5 ++++\n t/t3412-rebase-root.sh                    | 12 ++++----\n t/t3414-rebase-preserve-onto.sh           |  5 ++++\n t/t3418-rebase-continue.sh                |  4 +--\n t/t3421-rebase-topology-linear.sh         | 36 +++++++++++------------\n t/t3425-rebase-topology-merges.sh         |  5 ++++\n t/t5520-pull.sh                           |  6 ++--\n t/t7505-prepare-commit-msg-hook.sh        |  2 +-\n t/t7517-per-repo-email.sh                 |  6 ++--\n t/test-lib.sh                             |  4 +++\n 14 files changed, 69 insertions(+), 36 deletions(-)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 99d1fb79a8..68ca8dc9bb 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -312,7 +312,7 @@ test_expect_success 'retain authorship when squashing' '\n \tgit show HEAD | grep \"^Author: Twerp Snog\"\n '\n \n-test_expect_success '-p handles \"no changes\" gracefully' '\n+test_expect_success REBASE_P '-p handles \"no changes\" gracefully' '\n \tHEAD=$(git rev-parse HEAD) &&\n \tset_fake_editor &&\n \tgit rebase -i -p HEAD^ &&\n@@ -322,7 +322,7 @@ test_expect_success '-p handles \"no changes\" gracefully' '\n \ttest $HEAD = $(git rev-parse HEAD)\n '\n \n-test_expect_failure 'exchange two commits with -p' '\n+test_expect_failure REBASE_P 'exchange two commits with -p' '\n \tgit checkout H &&\n \tset_fake_editor &&\n \tFAKE_LINES=\"2 1\" git rebase -i -p HEAD~2 &&\n@@ -330,7 +330,7 @@ test_expect_failure 'exchange two commits with -p' '\n \ttest G = $(git cat-file commit HEAD | sed -ne \\$p)\n '\n \n-test_expect_success 'preserve merges with -p' '\n+test_expect_success REBASE_P 'preserve merges with -p' '\n \tgit checkout -b to-be-preserved master^ &&\n \t: > unrelated-file &&\n \tgit add unrelated-file &&\n@@ -373,7 +373,7 @@ test_expect_success 'preserve merges with -p' '\n \ttest $(git show HEAD:unrelated-file) = 1\n '\n \n-test_expect_success 'edit ancestor with -p' '\n+test_expect_success REBASE_P 'edit ancestor with -p' '\n \tset_fake_editor &&\n \tFAKE_LINES=\"1 2 edit 3 4\" git rebase -i -p HEAD~3 &&\n \techo 2 > unrelated-file &&\ndiff --git a/t/t3408-rebase-multi-line.sh b/t/t3408-rebase-multi-line.sh\nindex e7292f5b9b..d2bd7c17b0 100755\n--- a/t/t3408-rebase-multi-line.sh\n+++ b/t/t3408-rebase-multi-line.sh\n@@ -52,7 +52,7 @@ test_expect_success rebase '\n \ttest_cmp expect actual\n \n '\n-test_expect_success rebasep '\n+test_expect_success REBASE_P rebasep '\n \n \tgit checkout side-merge &&\n \tgit rebase -p side &&\ndiff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh\nindex 8c251c57a6..3b340f1ece 100755\n--- a/t/t3409-rebase-preserve-merges.sh\n+++ b/t/t3409-rebase-preserve-merges.sh\n@@ -8,6 +8,11 @@ Run \"git rebase -p\" and check that merges are properly carried along\n '\n . ./test-lib.sh\n \n+if ! test_have_prereq REBASE_P; then\n+\tskip_all='skipping git rebase -p tests, as asked for'\n+\ttest_done\n+fi\n+\n GIT_AUTHOR_EMAIL=bogus_email_address\n export GIT_AUTHOR_EMAIL\n \ndiff --git a/t/t3410-rebase-preserve-dropped-merges.sh b/t/t3410-rebase-preserve-dropped-merges.sh\nindex 6f73b95558..2e29866993 100755\n--- a/t/t3410-rebase-preserve-dropped-merges.sh\n+++ b/t/t3410-rebase-preserve-dropped-merges.sh\n@@ -11,6 +11,11 @@ rewritten.\n '\n . ./test-lib.sh\n \n+if ! test_have_prereq REBASE_P; then\n+\tskip_all='skipping git rebase -p tests, as asked for'\n+\ttest_done\n+fi\n+\n # set up two branches like this:\n #\n # A - B - C - D - E\ndiff --git a/t/t3411-rebase-preserve-around-merges.sh b/t/t3411-rebase-preserve-around-merges.sh\nindex dc81bf27eb..fb45e7bf7b 100755\n--- a/t/t3411-rebase-preserve-around-merges.sh\n+++ b/t/t3411-rebase-preserve-around-merges.sh\n@@ -10,6 +10,11 @@ a merge to before the merge.\n '\n . ./test-lib.sh\n \n+if ! test_have_prereq REBASE_P; then\n+\tskip_all='skipping git rebase -p tests, as asked for'\n+\ttest_done\n+fi\n+\n . \"$TEST_DIRECTORY\"/lib-rebase.sh\n \n set_fake_editor\ndiff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh\nindex 73a39f2923..21632a984e 100755\n--- a/t/t3412-rebase-root.sh\n+++ b/t/t3412-rebase-root.sh\n@@ -86,14 +86,14 @@ test_expect_success 'pre-rebase got correct input (4)' '\n \ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = z--root,work4\n '\n \n-test_expect_success 'rebase -i -p with linear history' '\n+test_expect_success REBASE_P 'rebase -i -p with linear history' '\n \tgit checkout -b work5 other &&\n \tgit rebase -i -p --root --onto master &&\n \tgit log --pretty=tformat:\"%s\" > rebased5 &&\n \ttest_cmp expect rebased5\n '\n \n-test_expect_success 'pre-rebase got correct input (5)' '\n+test_expect_success REBASE_P 'pre-rebase got correct input (5)' '\n \ttest \"z$(cat .git/PRE-REBASE-INPUT)\" = z--root,\n '\n \n@@ -120,7 +120,7 @@ commit work6~4\n 1\n EOF\n \n-test_expect_success 'rebase -i -p with merge' '\n+test_expect_success REBASE_P 'rebase -i -p with merge' '\n \tgit checkout -b work6 other &&\n \tgit rebase -i -p --root --onto master &&\n \tlog_with_names work6 > rebased6 &&\n@@ -155,7 +155,7 @@ commit work7~5\n 1\n EOF\n \n-test_expect_success 'rebase -i -p with two roots' '\n+test_expect_success REBASE_P 'rebase -i -p with two roots' '\n \tgit checkout -b work7 other &&\n \tgit rebase -i -p --root --onto master &&\n \tlog_with_names work7 > rebased7 &&\n@@ -261,7 +261,7 @@ commit conflict3~6\n 1\n EOF\n \n-test_expect_success 'rebase -i -p --root with conflict (first part)' '\n+test_expect_success REBASE_P 'rebase -i -p --root with conflict (first part)' '\n \tgit checkout -b conflict3 other &&\n \ttest_must_fail git rebase -i -p --root --onto master &&\n \tgit ls-files -u | grep \"B$\"\n@@ -272,7 +272,7 @@ test_expect_success 'fix the conflict' '\n \tgit add B\n '\n \n-test_expect_success 'rebase -i -p --root with conflict (second part)' '\n+test_expect_success REBASE_P 'rebase -i -p --root with conflict (second part)' '\n \tgit rebase --continue &&\n \tlog_with_names conflict3 >out &&\n \ttest_cmp expect-conflict-p out\ndiff --git a/t/t3414-rebase-preserve-onto.sh b/t/t3414-rebase-preserve-onto.sh\nindex ee0a6cccfd..72e04b5386 100755\n--- a/t/t3414-rebase-preserve-onto.sh\n+++ b/t/t3414-rebase-preserve-onto.sh\n@@ -10,6 +10,11 @@ aren'\"'\"'t on top of $ONTO, even if they are on top of $UPSTREAM.\n '\n . ./test-lib.sh\n \n+if ! test_have_prereq REBASE_P; then\n+\tskip_all='skipping git rebase -p tests, as asked for'\n+\ttest_done\n+fi\n+\n . \"$TEST_DIRECTORY\"/lib-rebase.sh\n \n # Set up branches like this:\ndiff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh\nindex 031e3d8ddb..f0025c7810 100755\n--- a/t/t3418-rebase-continue.sh\n+++ b/t/t3418-rebase-continue.sh\n@@ -106,7 +106,7 @@ test_expect_success 'rebase -i --continue handles merge strategy and options' '\n \ttest -f funny.was.run\n '\n \n-test_expect_success 'rebase passes merge strategy options correctly' '\n+test_expect_success REBASE_P 'rebase passes merge strategy options correctly' '\n \trm -fr .git/rebase-* &&\n \tgit reset --hard commit-new-file-F3-on-topic-branch &&\n \ttest_commit theirs-to-merge &&\n@@ -241,6 +241,6 @@ test_rerere_autoupdate\n test_rerere_autoupdate -m\n GIT_SEQUENCE_EDITOR=: && export GIT_SEQUENCE_EDITOR\n test_rerere_autoupdate -i\n-test_rerere_autoupdate --preserve-merges\n+test_have_prereq !REBASE_P || test_rerere_autoupdate --preserve-merges\n \n test_done\ndiff --git a/t/t3421-rebase-topology-linear.sh b/t/t3421-rebase-topology-linear.sh\nindex 99b2aac921..23ad4cff35 100755\n--- a/t/t3421-rebase-topology-linear.sh\n+++ b/t/t3421-rebase-topology-linear.sh\n@@ -29,7 +29,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -43,7 +43,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -59,7 +59,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase failure -p\n+test_have_prereq !REBASE_P || test_run_rebase failure -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -73,7 +73,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n #       f\n #      /\n@@ -113,7 +113,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase failure -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -128,7 +128,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase failure -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -143,7 +143,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase failure -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -158,7 +158,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n # a---b---c---j!\n #      \\\n@@ -186,7 +186,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -201,7 +201,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase failure -p\n+test_have_prereq !REBASE_P || test_run_rebase failure -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -216,7 +216,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase failure -p\n+test_have_prereq !REBASE_P || test_run_rebase failure -p\n test_run_rebase success --rebase-merges\n \n #       m\n@@ -256,7 +256,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -271,7 +271,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase failure -p\n+test_have_prereq !REBASE_P || test_run_rebase failure -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -286,7 +286,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase failure -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -302,7 +302,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase failure -p\n+test_have_prereq !REBASE_P || test_run_rebase failure -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -317,7 +317,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase failure -m\n test_run_rebase success -i\n-test_run_rebase failure -p\n+test_have_prereq !REBASE_P || test_run_rebase failure -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -331,7 +331,7 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase failure -p\n+test_have_prereq !REBASE_P || test_run_rebase failure -p\n \n test_run_rebase () {\n \tresult=$1\n@@ -346,6 +346,6 @@ test_run_rebase () {\n test_run_rebase success ''\n test_run_rebase success -m\n test_run_rebase success -i\n-test_run_rebase success -p\n+test_have_prereq !REBASE_P || test_run_rebase success -p\n \n test_done\ndiff --git a/t/t3425-rebase-topology-merges.sh b/t/t3425-rebase-topology-merges.sh\nindex 846f85c27e..5f892e33d7 100755\n--- a/t/t3425-rebase-topology-merges.sh\n+++ b/t/t3425-rebase-topology-merges.sh\n@@ -109,6 +109,11 @@ test_run_rebase success 'd e n o' ''\n test_run_rebase success 'd e n o' -m\n test_run_rebase success 'd n o e' -i\n \n+if ! test_have_prereq REBASE_P; then\n+\tskip_all='skipping git rebase -p tests, as asked for'\n+\ttest_done\n+fi\n+\n test_expect_success \"rebase -p is no-op in non-linear history\" \"\n \treset_rebase &&\n \tgit rebase -p d w &&\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex 5e501c8b08..cf4cc32fd0 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -461,7 +461,8 @@ test_expect_success 'pull.rebase=1 is treated as true and flattens keep-merge' '\n \ttest file3 = \"$(git show HEAD:file3.t)\"\n '\n \n-test_expect_success 'pull.rebase=preserve rebases and merges keep-merge' '\n+test_expect_success REBASE_P \\\n+\t'pull.rebase=preserve rebases and merges keep-merge' '\n \tgit reset --hard before-preserve-rebase &&\n \ttest_config pull.rebase preserve &&\n \tgit pull . copy &&\n@@ -514,7 +515,8 @@ test_expect_success '--rebase=true rebases and flattens keep-merge' '\n \ttest file3 = \"$(git show HEAD:file3.t)\"\n '\n \n-test_expect_success '--rebase=preserve rebases and merges keep-merge' '\n+test_expect_success REBASE_P \\\n+\t'--rebase=preserve rebases and merges keep-merge' '\n \tgit reset --hard before-preserve-rebase &&\n \ttest_config pull.rebase true &&\n \tgit pull --rebase=preserve . copy &&\ndiff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh\nindex 1f43b3cd4c..ebfcad9c4c 100755\n--- a/t/t7505-prepare-commit-msg-hook.sh\n+++ b/t/t7505-prepare-commit-msg-hook.sh\n@@ -253,7 +253,7 @@ test_rebase () {\n }\n \n test_rebase success -i\n-test_rebase success -p\n+test_have_prereq !REBASE_P || test_rebase success -p\n \n test_expect_success 'with hook (cherry-pick)' '\n \ttest_when_finished \"git checkout -f master\" &&\ndiff --git a/t/t7517-per-repo-email.sh b/t/t7517-per-repo-email.sh\nindex 2a22fa7588..231b8cc19d 100755\n--- a/t/t7517-per-repo-email.sh\n+++ b/t/t7517-per-repo-email.sh\n@@ -72,12 +72,14 @@ test_expect_success 'noop interactive rebase does not care about ident' '\n \tgit rebase -i HEAD^\n '\n \n-test_expect_success 'fast-forward rebase does not care about ident (preserve)' '\n+test_expect_success REBASE_P \\\n+\t'fast-forward rebase does not care about ident (preserve)' '\n \tgit checkout -B tmp side-without-commit &&\n \tgit rebase -p master\n '\n \n-test_expect_success 'non-fast-forward rebase refuses to write commits (preserve)' '\n+test_expect_success REBASE_P \\\n+\t'non-fast-forward rebase refuses to write commits (preserve)' '\n \ttest_when_finished \"git rebase --abort || true\" &&\n \tgit checkout -B tmp side-with-commit &&\n \ttest_must_fail git rebase -p master\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 897e6fcc94..8b3d0ca7d1 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1268,3 +1268,7 @@ test_lazy_prereq CURL '\n test_lazy_prereq SHA1 '\n \ttest $(git hash-object /dev/null) = e69de29bb2d1d6434b8b29ae775ad8c2e48c5391\n '\n+\n+test_lazy_prereq REBASE_P '\n+\ttest -z \"$GIT_TEST_SKIP_REBASE_P\"\n+'\n-- \ngitgitgadget\n"},{"id":"362150","messageId":"xmqqh8h1tjg9.fsf@gitster-ct.c.googlers.com","threadId":"49726","inReplyTo":"39734e4805cbd695cd69e7c1a3016de629ac9b3c.1541016115.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 3/3] tests: optionally skip `git rebase -p` tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-11-01T06:12:22Z","receivedAt":"2018-11-01T06:12:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> The `--preserve-merges` mode of the `rebase` command is slated to be\n> deprecated soon, ...\n\nIs everybody on board on this statement?  I vaguely recall that some\npeople wanted to have something different from what rebase-merges\ndoes (e.g. wrt first-parent history), and extending perserve-merges\nmight be one way to do so.\n\nI do not mind at all if the way forward were to extend rebase-merges\nfor any future features.  To me, it is preferrable having to deal\nwith just one codepath than two written in different languages.\n\nI just want to make sure we know everybody is on board the plan that\nwe will eventually remove preserve-merges, tell those who want to\nuse it to switch to rebase-merges, and we will extend rebase-merges\nwhen they raise issues with it saying that they cannot do something\npreserve-merges would have served them well with rebase-merges.\n"},{"id":"362202","messageId":"da1d00b5-8516-6185-60cf-cc7738daa1a3@kdbg.org","threadId":"49726","inReplyTo":"xmqqh8h1tjg9.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 3/3] tests: optionally skip `git rebase -p` tests","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-11-01T17:18:00Z","receivedAt":"2018-11-01T17:18:04Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 01.11.18 um 07:12 schrieb Junio C Hamano:\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n> writes:\n> \n>> The `--preserve-merges` mode of the `rebase` command is slated to be\n>> deprecated soon, ...\n> \n> Is everybody on board on this statement?  I vaguely recall that some\n> people wanted to have something different from what rebase-merges\n> does (e.g. wrt first-parent history), and extending perserve-merges\n> might be one way to do so.\n\nMaybe you are referring to my proposals from a long time ago. My \nfirst-parent hack did not work very well, and I have changed my \nworkflow. --preserve-merges is certainly not a feature that *I* would \nlike to keep.\n\nThe important question is whether there are too many users of \npreserve-merges who would be hurt when it is removed. It is irrelevant \nwhether preserve-merges is a good base for extensions because it can \neasily be resurrected if the need arises.\n\n> I do not mind at all if the way forward were to extend rebase-merges\n> for any future features.  To me, it is preferrable having to deal\n> with just one codepath than two written in different languages.\n> \n> I just want to make sure we know everybody is on board the plan that\n> we will eventually remove preserve-merges, tell those who want to\n> use it to switch to rebase-merges, and we will extend rebase-merges\n> when they raise issues with it saying that they cannot do something\n> preserve-merges would have served them well with rebase-merges.\n\n-- Hannes\n"},{"id":"362217","messageId":"xmqq4ld0tl8s.fsf@gitster-ct.c.googlers.com","threadId":"49726","inReplyTo":"da1d00b5-8516-6185-60cf-cc7738daa1a3@kdbg.org","subject":"Re: [PATCH 3/3] tests: optionally skip `git rebase -p` tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-11-01T23:45:55Z","receivedAt":"2018-11-01T23:46:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> Am 01.11.18 um 07:12 schrieb Junio C Hamano:\n>> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n>> writes:\n>>\n>>> The `--preserve-merges` mode of the `rebase` command is slated to be\n>>> deprecated soon, ...\n>>\n>> Is everybody on board on this statement?  I vaguely recall that some\n>> people wanted to have something different from what rebase-merges\n>> does (e.g. wrt first-parent history), and extending perserve-merges\n>> might be one way to do so.\n>\n> Maybe you are referring to my proposals from a long time ago. My\n> first-parent hack did not work very well, and I have changed my\n> workflow. --preserve-merges is certainly not a feature that *I* would\n> like to keep.\n\nThanks, that reduces my worries.\n\n> The important question is whether there are too many users of\n> preserve-merges who would be hurt when it is removed.\n\nYes, and the claim this series makes is that there is none and all\nexisting users should be able to happily use the rebase-merges,\nwhich also means that we need to commit to improve rebase-merges to\nsupport them, if there were some corner cases, which we failed to\nconsider so far, that are not yet served well.\n\nAs I said, as long as everybody agrees with the plan (e.g. we'll\nknow when we hear no objections to the planned deprecation in a few\nweeks), I am perfectly OK with it.\n\nThanks.\n"}]}