{"thread":{"id":"49682","subject":"[PATCH sg/test-rebase-editor-fix] t3404-rebase-interactive: test abbreviated commands","startedAt":"2018-10-25T20:54:50Z","lastAt":"2018-10-27T08:09:14Z","messageCount":4,"participants":["Johannes Sixt","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"361558","messageId":"94c0b5b6-ac31-101b-80a0-ac78196e0f62@kdbg.org","threadId":"49682","inReplyTo":null,"subject":"[PATCH sg/test-rebase-editor-fix] t3404-rebase-interactive: test abbreviated commands","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-10-25T20:54:46Z","receivedAt":"2018-10-25T20:54:50Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Test each short command at least once. The commands changed here\nare chosen such that\n\n- tests do not have a prerequisite,\n- the 'git rebase' command is not guarded by test_must_fail.\n\nThe pick commands are optional noise words in the FAKE_LINES\nvariable. Test them, too.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n This patch must be placed on top of sg/test-rebase-editor-fix.\n It has a textual conflict with my sequencer 'b' fix from some\n minutes ago, but the resolution should be obvious:\n\n - \t\texec*|break|b)\n  -\t\texec_*|x_*)\n ++\t\texec_*|x_*|break|b)\n\n t/lib-rebase.sh               |  4 ++--\n t/t3404-rebase-interactive.sh | 10 +++++-----\n 2 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/lib-rebase.sh b/t/lib-rebase.sh\nindex 2ca9fb69d6..0c93d00bdd 100644\n--- a/t/lib-rebase.sh\n+++ b/t/lib-rebase.sh\n@@ -47,9 +47,9 @@ set_fake_editor () {\n \taction=pick\n \tfor line in $FAKE_LINES; do\n \t\tcase $line in\n-\t\tpick|squash|fixup|edit|reword|drop)\n+\t\tpick|p|squash|s|fixup|f|edit|e|reword|r|drop|d)\n \t\t\taction=\"$line\";;\n-\t\texec*)\n+\t\texec_*|x_*)\n \t\t\techo \"$line\" | sed 's/_/ /g' >> \"$1\";;\n \t\t\"#\")\n \t\t\techo '# comment' >> \"$1\";;\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 352a52e59d..d36ee4f807 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -114,7 +114,7 @@ test_expect_success 'rebase -i with exec allows git commands in subdirs' '\n \tgit checkout master &&\n \tmkdir subdir && (cd subdir &&\n \tset_fake_editor &&\n-\tFAKE_LINES=\"1 exec_cd_subdir_&&_git_rev-parse_--is-inside-work-tree\" \\\n+\tFAKE_LINES=\"1 x_cd_subdir_&&_git_rev-parse_--is-inside-work-tree\" \\\n \t\tgit rebase -i HEAD^\n \t)\n '\n@@ -499,7 +499,7 @@ test_expect_success 'squash works as expected' '\n \tgit checkout -b squash-works no-conflict-branch &&\n \tone=$(git rev-parse HEAD~3) &&\n \tset_fake_editor &&\n-\tFAKE_LINES=\"1 squash 3 2\" EXPECT_HEADER_COUNT=2 \\\n+\tFAKE_LINES=\"1 s 3 2\" EXPECT_HEADER_COUNT=2 \\\n \t\tgit rebase -i HEAD~3 &&\n \ttest $one = $(git rev-parse HEAD~2)\n '\n@@ -732,7 +732,7 @@ test_expect_success 'reword' '\n \tgit show HEAD^ | grep \"D changed\" &&\n \tFAKE_LINES=\"reword 1 2 3 4\" FAKE_COMMIT_MESSAGE=\"B changed\" git rebase -i A &&\n \tgit show HEAD~3 | grep \"B changed\" &&\n-\tFAKE_LINES=\"1 reword 2 3 4\" FAKE_COMMIT_MESSAGE=\"C changed\" git rebase -i A &&\n+\tFAKE_LINES=\"1 r 2 pick 3 p 4\" FAKE_COMMIT_MESSAGE=\"C changed\" git rebase -i A &&\n \tgit show HEAD~2 | grep \"C changed\"\n '\n \n@@ -758,7 +758,7 @@ test_expect_success 'rebase -i can copy notes over a fixup' '\n \tgit reset --hard n3 &&\n \tgit notes add -m\"an earlier note\" n2 &&\n \tset_fake_editor &&\n-\tGIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES=\"1 fixup 2\" git rebase -i n1 &&\n+\tGIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES=\"1 f 2\" git rebase -i n1 &&\n \tgit notes show > output &&\n \ttest_cmp expect output\n '\n@@ -1208,7 +1208,7 @@ rebase_setup_and_clean () {\n test_expect_success 'drop' '\n \trebase_setup_and_clean drop-test &&\n \tset_fake_editor &&\n-\tFAKE_LINES=\"1 drop 2 3 drop 4 5\" git rebase -i --root &&\n+\tFAKE_LINES=\"1 drop 2 3 d 4 5\" git rebase -i --root &&\n \ttest E = $(git cat-file commit HEAD | sed -ne \\$p) &&\n \ttest C = $(git cat-file commit HEAD^ | sed -ne \\$p) &&\n \ttest A = $(git cat-file commit HEAD^^ | sed -ne \\$p)\n-- \n2.19.1.406.g1aa3f475f3\n"},{"id":"361559","messageId":"df45cad7-0290-f308-5463-e79cdd0ebea8@kdbg.org","threadId":"49682","inReplyTo":"94c0b5b6-ac31-101b-80a0-ac78196e0f62@kdbg.org","subject":"Re: [PATCH sg/test-rebase-editor-fix] t3404-rebase-interactive: test abbreviated commands","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-10-25T21:04:58Z","receivedAt":"2018-10-25T21:05:01Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 25.10.18 um 22:54 schrieb Johannes Sixt:\n> Test each short command at least once. The commands changed here\n> are chosen such that\n> \n> - tests do not have a prerequisite,\n> - the 'git rebase' command is not guarded by test_must_fail.\n> \n> The pick commands are optional noise words in the FAKE_LINES\n> variable. Test them, too.\n\nActually, this sentence should better be:\n\nThe pick commands are optional in the FAKE_LINES variable, but\nwhen used, they do end up in the insn sheet. Test them, too.\n\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n...\n> @@ -732,7 +732,7 @@ test_expect_success 'reword' '\n>   \tgit show HEAD^ | grep \"D changed\" &&\n>   \tFAKE_LINES=\"reword 1 2 3 4\" FAKE_COMMIT_MESSAGE=\"B changed\" git rebase -i A &&\n>   \tgit show HEAD~3 | grep \"B changed\" &&\n> -\tFAKE_LINES=\"1 reword 2 3 4\" FAKE_COMMIT_MESSAGE=\"C changed\" git rebase -i A &&\n> +\tFAKE_LINES=\"1 r 2 pick 3 p 4\" FAKE_COMMIT_MESSAGE=\"C changed\" git rebase -i A &&\n>   \tgit show HEAD~2 | grep \"C changed\"\n>   '\n"},{"id":"361610","messageId":"nycvar.QRO.7.76.6.1810261006510.4546@tvgsbejvaqbjf.bet","threadId":"49682","inReplyTo":"94c0b5b6-ac31-101b-80a0-ac78196e0f62@kdbg.org","subject":"Re: [PATCH sg/test-rebase-editor-fix] t3404-rebase-interactive: test abbreviated commands","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-10-26T08:11:12Z","receivedAt":"2018-10-26T08:11:09Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Hannes,\n\n\nOn Thu, 25 Oct 2018, Johannes Sixt wrote:\n\n> Test each short command at least once. The commands changed here\n> are chosen such that\n\nI stumbled over this, and understood it only after looking at the patch.\nHow about this instead:\n\n\tMake sure that each short command is tested at least once. To do\n\tso, we modify existing tests to avoid lengthening the already\n\tformidable runtime of t3404 (13 minutes on Windows). These rules\n\twere followed to find appropriate commands to modify:\n\n> - tests do not have a prerequisite,\n> - the 'git rebase' command is not guarded by test_must_fail.\n> \n> The pick commands are optional noise words in the FAKE_LINES\n> variable. Test them, too.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n\nThe rest looks good to me.\n\nThanks,\nDscho\n\n> ---\n>  This patch must be placed on top of sg/test-rebase-editor-fix.\n>  It has a textual conflict with my sequencer 'b' fix from some\n>  minutes ago, but the resolution should be obvious:\n> \n>  - \t\texec*|break|b)\n>   -\t\texec_*|x_*)\n>  ++\t\texec_*|x_*|break|b)\n> \n>  t/lib-rebase.sh               |  4 ++--\n>  t/t3404-rebase-interactive.sh | 10 +++++-----\n>  2 files changed, 7 insertions(+), 7 deletions(-)\n> \n> diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh\n> index 2ca9fb69d6..0c93d00bdd 100644\n> --- a/t/lib-rebase.sh\n> +++ b/t/lib-rebase.sh\n> @@ -47,9 +47,9 @@ set_fake_editor () {\n>  \taction=pick\n>  \tfor line in $FAKE_LINES; do\n>  \t\tcase $line in\n> -\t\tpick|squash|fixup|edit|reword|drop)\n> +\t\tpick|p|squash|s|fixup|f|edit|e|reword|r|drop|d)\n>  \t\t\taction=\"$line\";;\n> -\t\texec*)\n> +\t\texec_*|x_*)\n>  \t\t\techo \"$line\" | sed 's/_/ /g' >> \"$1\";;\n>  \t\t\"#\")\n>  \t\t\techo '# comment' >> \"$1\";;\n> diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\n> index 352a52e59d..d36ee4f807 100755\n> --- a/t/t3404-rebase-interactive.sh\n> +++ b/t/t3404-rebase-interactive.sh\n> @@ -114,7 +114,7 @@ test_expect_success 'rebase -i with exec allows git commands in subdirs' '\n>  \tgit checkout master &&\n>  \tmkdir subdir && (cd subdir &&\n>  \tset_fake_editor &&\n> -\tFAKE_LINES=\"1 exec_cd_subdir_&&_git_rev-parse_--is-inside-work-tree\" \\\n> +\tFAKE_LINES=\"1 x_cd_subdir_&&_git_rev-parse_--is-inside-work-tree\" \\\n>  \t\tgit rebase -i HEAD^\n>  \t)\n>  '\n> @@ -499,7 +499,7 @@ test_expect_success 'squash works as expected' '\n>  \tgit checkout -b squash-works no-conflict-branch &&\n>  \tone=$(git rev-parse HEAD~3) &&\n>  \tset_fake_editor &&\n> -\tFAKE_LINES=\"1 squash 3 2\" EXPECT_HEADER_COUNT=2 \\\n> +\tFAKE_LINES=\"1 s 3 2\" EXPECT_HEADER_COUNT=2 \\\n>  \t\tgit rebase -i HEAD~3 &&\n>  \ttest $one = $(git rev-parse HEAD~2)\n>  '\n> @@ -732,7 +732,7 @@ test_expect_success 'reword' '\n>  \tgit show HEAD^ | grep \"D changed\" &&\n>  \tFAKE_LINES=\"reword 1 2 3 4\" FAKE_COMMIT_MESSAGE=\"B changed\" git rebase -i A &&\n>  \tgit show HEAD~3 | grep \"B changed\" &&\n> -\tFAKE_LINES=\"1 reword 2 3 4\" FAKE_COMMIT_MESSAGE=\"C changed\" git rebase -i A &&\n> +\tFAKE_LINES=\"1 r 2 pick 3 p 4\" FAKE_COMMIT_MESSAGE=\"C changed\" git rebase -i A &&\n>  \tgit show HEAD~2 | grep \"C changed\"\n>  '\n>  \n> @@ -758,7 +758,7 @@ test_expect_success 'rebase -i can copy notes over a fixup' '\n>  \tgit reset --hard n3 &&\n>  \tgit notes add -m\"an earlier note\" n2 &&\n>  \tset_fake_editor &&\n> -\tGIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES=\"1 fixup 2\" git rebase -i n1 &&\n> +\tGIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES=\"1 f 2\" git rebase -i n1 &&\n>  \tgit notes show > output &&\n>  \ttest_cmp expect output\n>  '\n> @@ -1208,7 +1208,7 @@ rebase_setup_and_clean () {\n>  test_expect_success 'drop' '\n>  \trebase_setup_and_clean drop-test &&\n>  \tset_fake_editor &&\n> -\tFAKE_LINES=\"1 drop 2 3 drop 4 5\" git rebase -i --root &&\n> +\tFAKE_LINES=\"1 drop 2 3 d 4 5\" git rebase -i --root &&\n>  \ttest E = $(git cat-file commit HEAD | sed -ne \\$p) &&\n>  \ttest C = $(git cat-file commit HEAD^ | sed -ne \\$p) &&\n>  \ttest A = $(git cat-file commit HEAD^^ | sed -ne \\$p)\n> -- \n> 2.19.1.406.g1aa3f475f3\n> \n"},{"id":"361773","messageId":"7b8864a8-ac60-54a8-dfbb-8b07bfa39c39@kdbg.org","threadId":"49682","inReplyTo":"nycvar.QRO.7.76.6.1810261006510.4546@tvgsbejvaqbjf.bet","subject":"[PATCH v2 sg/test-rebase-editor-fix] t3404-rebase-interactive: test abbreviated commands","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-10-27T08:08:01Z","receivedAt":"2018-10-27T08:09:14Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Make sure that each short command is tested at least once. To\nnot exacerbate the runtime of the test script, do not add new\ntests, but modify existing ones according to these criteria:\n\n- The test does not have a prerequisite.\n- The 'git rebase' command is not guarded by test_must_fail.\n\nThe pick commands are optional in the FAKE_LINES variable, but\nwhen used, they do end up in the insn sheet. Test them, too.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n v2:\n - updated commit message\n - patch text is unchanged\n\n t/lib-rebase.sh               |  4 ++--\n t/t3404-rebase-interactive.sh | 10 +++++-----\n 2 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/lib-rebase.sh b/t/lib-rebase.sh\nindex 2ca9fb69d6..0c93d00bdd 100644\n--- a/t/lib-rebase.sh\n+++ b/t/lib-rebase.sh\n@@ -47,9 +47,9 @@ set_fake_editor () {\n \taction=pick\n \tfor line in $FAKE_LINES; do\n \t\tcase $line in\n-\t\tpick|squash|fixup|edit|reword|drop)\n+\t\tpick|p|squash|s|fixup|f|edit|e|reword|r|drop|d)\n \t\t\taction=\"$line\";;\n-\t\texec*)\n+\t\texec_*|x_*)\n \t\t\techo \"$line\" | sed 's/_/ /g' >> \"$1\";;\n \t\t\"#\")\n \t\t\techo '# comment' >> \"$1\";;\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 352a52e59d..d36ee4f807 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -114,7 +114,7 @@ test_expect_success 'rebase -i with exec allows git commands in subdirs' '\n \tgit checkout master &&\n \tmkdir subdir && (cd subdir &&\n \tset_fake_editor &&\n-\tFAKE_LINES=\"1 exec_cd_subdir_&&_git_rev-parse_--is-inside-work-tree\" \\\n+\tFAKE_LINES=\"1 x_cd_subdir_&&_git_rev-parse_--is-inside-work-tree\" \\\n \t\tgit rebase -i HEAD^\n \t)\n '\n@@ -499,7 +499,7 @@ test_expect_success 'squash works as expected' '\n \tgit checkout -b squash-works no-conflict-branch &&\n \tone=$(git rev-parse HEAD~3) &&\n \tset_fake_editor &&\n-\tFAKE_LINES=\"1 squash 3 2\" EXPECT_HEADER_COUNT=2 \\\n+\tFAKE_LINES=\"1 s 3 2\" EXPECT_HEADER_COUNT=2 \\\n \t\tgit rebase -i HEAD~3 &&\n \ttest $one = $(git rev-parse HEAD~2)\n '\n@@ -732,7 +732,7 @@ test_expect_success 'reword' '\n \tgit show HEAD^ | grep \"D changed\" &&\n \tFAKE_LINES=\"reword 1 2 3 4\" FAKE_COMMIT_MESSAGE=\"B changed\" git rebase -i A &&\n \tgit show HEAD~3 | grep \"B changed\" &&\n-\tFAKE_LINES=\"1 reword 2 3 4\" FAKE_COMMIT_MESSAGE=\"C changed\" git rebase -i A &&\n+\tFAKE_LINES=\"1 r 2 pick 3 p 4\" FAKE_COMMIT_MESSAGE=\"C changed\" git rebase -i A &&\n \tgit show HEAD~2 | grep \"C changed\"\n '\n \n@@ -758,7 +758,7 @@ test_expect_success 'rebase -i can copy notes over a fixup' '\n \tgit reset --hard n3 &&\n \tgit notes add -m\"an earlier note\" n2 &&\n \tset_fake_editor &&\n-\tGIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES=\"1 fixup 2\" git rebase -i n1 &&\n+\tGIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES=\"1 f 2\" git rebase -i n1 &&\n \tgit notes show > output &&\n \ttest_cmp expect output\n '\n@@ -1208,7 +1208,7 @@ rebase_setup_and_clean () {\n test_expect_success 'drop' '\n \trebase_setup_and_clean drop-test &&\n \tset_fake_editor &&\n-\tFAKE_LINES=\"1 drop 2 3 drop 4 5\" git rebase -i --root &&\n+\tFAKE_LINES=\"1 drop 2 3 d 4 5\" git rebase -i --root &&\n \ttest E = $(git cat-file commit HEAD | sed -ne \\$p) &&\n \ttest C = $(git cat-file commit HEAD^ | sed -ne \\$p) &&\n \ttest A = $(git cat-file commit HEAD^^ | sed -ne \\$p)\n-- \n2.19.1.406.g1aa3f475f3\n"}]}