{"thread":{"id":"59767","subject":"[PATCH 00/20] tests: modernize test format","startedAt":"2023-05-18T20:03:32Z","lastAt":"2023-05-19T18:35:03Z","messageCount":25,"participants":["John Cai via GitGitGadget","Eric Sunshine","Junio C Hamano","John Cai"],"isPatch":true,"patchVersion":1,"patchTotal":20},"messages":[{"id":"477541","messageId":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":null,"subject":"[PATCH 00/20] tests: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:05Z","receivedAt":"2023-05-18T20:03:32Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"There are a number of tests that still follow an old convention of using\nfour-space indentation. Update a bunch of tests to use the new convention\nwith tab indentation.\n\nJohn Cai (20):\n  t1000-basic: modernize test format\n  t0030-stripspace: modernize test format\n  t3210-pack-refs: modernize test format\n  t1001-read-tree-m-2way: modernize test format\n  t1002-read-tree-m-u-2way: modernize test format\n  t1006-cat-file: modernize test format\n  t3500-cherry: modernize test format\n  t3700-add: modernize test format\n  t3903-stash: modernize test format\n  t4002-diff-basic: modernize test format\n  t4003-diff-rename-1: modernize test format\n  t4004-diff-rename-symlink: modernize test format\n  t4202-log: modernize test format\n  t4206-log-follow-harder-copies: modernize test format\n  t5300-pack-object: modernize test format\n  t5301-sliding-window: modernize test format\n  t5303-pack-corruption-resilience: modernize test format\n  t5306-pack-nobase: modernize test format\n  t6050-replace: modernize test format\n  t7101-reset-empty-subdirs: modernize test format\n\n t/t0000-basic.sh                      |   2 +-\n t/t0030-stripspace.sh                 | 560 ++++++++++++------------\n t/t1001-read-tree-m-2way.sh           |   2 +-\n t/t1002-read-tree-m-u-2way.sh         | 589 +++++++++++++-------------\n t/t1006-cat-file.sh                   |  26 +-\n t/t3210-pack-refs.sh                  | 154 +++----\n t/t3500-cherry.sh                     |  69 ++-\n t/t3700-add.sh                        |  34 +-\n t/t3903-stash.sh                      |  26 +-\n t/t4002-diff-basic.sh                 | 243 ++++++-----\n t/t4003-diff-rename-1.sh              |  62 +--\n t/t4004-diff-rename-symlink.sh        |  42 +-\n t/t4202-log.sh                        |   8 +-\n t/t4206-log-follow-harder-copies.sh   |  36 +-\n t/t5300-pack-object.sh                | 184 ++++----\n t/t5301-sliding-window.sh             | 100 ++---\n t/t5303-pack-corruption-resilience.sh | 584 ++++++++++++-------------\n t/t5306-pack-nobase.sh                |  94 ++--\n t/t6050-replace.sh                    | 296 ++++++-------\n t/t7101-reset-empty-subdirs.sh        |  48 +--\n 20 files changed, 1565 insertions(+), 1594 deletions(-)\n\n\nbase-commit: 004e0f790f947c9c511a9ac4f905021c7dbfa9e1\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1513%2Fjohn-cai%2Fjc%2Fmodernize-test-format-1-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1513/john-cai/jc/modernize-test-format-1-v1\nPull-Request: https://github.com/git/git/pull/1513\n-- \ngitgitgadget\n"},{"id":"477542","messageId":"b974c43ef661db2f34b157c853d59b01f35a4767.1684440205.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 01/20] t1000-basic: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:06Z","receivedAt":"2023-05-18T20:03:33Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests in t1000-basic.sh used the older four space indent format.\nUpdate these to use tabs.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t0000-basic.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\nindex 8ea31d187a9..6e300be2ac5 100755\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -1014,7 +1014,7 @@ test_expect_success 'validate object ID for a known tree' '\n '\n \n test_expect_success 'showing tree with git ls-tree' '\n-    git ls-tree $tree >current\n+\tgit ls-tree $tree >current\n '\n \n test_expect_success 'git ls-tree output for a known tree' '\n-- \ngitgitgadget\n\n"},{"id":"477543","messageId":"68a54a55ea227ec8bba00239c0de99cc6eaf40ce.1684440205.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 02/20] t0030-stripspace: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:07Z","receivedAt":"2023-05-18T20:03:35Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests in t0030-stripspace.sh used the older four space indent\nformat. Update these to use tabs.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t0030-stripspace.sh | 560 ++++++++++++++++++++----------------------\n 1 file changed, 271 insertions(+), 289 deletions(-)\n\ndiff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh\nindex 0a5713c5248..d1b3be87257 100755\n--- a/t/t0030-stripspace.sh\n+++ b/t/t0030-stripspace.sh\n@@ -17,396 +17,378 @@ printf_git_stripspace () {\n     printf \"$1\" | git stripspace\n }\n \n-test_expect_success \\\n-    'long lines without spaces should be unchanged' '\n-    echo \"$ttt\" >expect &&\n-    git stripspace <expect >actual &&\n-    test_cmp expect actual &&\n-\n-    echo \"$ttt$ttt\" >expect &&\n-    git stripspace <expect >actual &&\n-    test_cmp expect actual &&\n-\n-    echo \"$ttt$ttt$ttt\" >expect &&\n-    git stripspace <expect >actual &&\n-    test_cmp expect actual &&\n-\n-    echo \"$ttt$ttt$ttt$ttt\" >expect &&\n-    git stripspace <expect >actual &&\n-    test_cmp expect actual\n+test_expect_success 'long lines without spaces should be unchanged' '\n+\techo \"$ttt\" >expect &&\n+\tgit stripspace <expect >actual &&\n+\ttest_cmp expect actual &&\n+\n+\techo \"$ttt$ttt\" >expect &&\n+\tgit stripspace <expect >actual &&\n+\ttest_cmp expect actual &&\n+\n+\techo \"$ttt$ttt$ttt\" >expect &&\n+\tgit stripspace <expect >actual &&\n+\ttest_cmp expect actual &&\n+\n+\techo \"$ttt$ttt$ttt$ttt\" >expect &&\n+\tgit stripspace <expect >actual &&\n+\ttest_cmp expect actual\n '\n \n-test_expect_success \\\n-    'lines with spaces at the beginning should be unchanged' '\n-    echo \"$sss$ttt\" >expect &&\n-    git stripspace <expect >actual &&\n-    test_cmp expect actual &&\n+test_expect_success 'lines with spaces at the beginning should be unchanged' '\n+\techo \"$sss$ttt\" >expect &&\n+\tgit stripspace <expect >actual &&\n+\ttest_cmp expect actual &&\n \n-    echo \"$sss$sss$ttt\" >expect &&\n-    git stripspace <expect >actual &&\n-    test_cmp expect actual &&\n+\techo \"$sss$sss$ttt\" >expect &&\n+\tgit stripspace <expect >actual &&\n+\ttest_cmp expect actual &&\n \n-    echo \"$sss$sss$sss$ttt\" >expect &&\n-    git stripspace <expect >actual &&\n-    test_cmp expect actual\n+\techo \"$sss$sss$sss$ttt\" >expect &&\n+\tgit stripspace <expect >actual &&\n+\ttest_cmp expect actual\n '\n \n-test_expect_success \\\n-    'lines with intermediate spaces should be unchanged' '\n-    echo \"$ttt$sss$ttt\" >expect &&\n-    git stripspace <expect >actual &&\n-    test_cmp expect actual &&\n+test_expect_success 'lines with intermediate spaces should be unchanged' '\n+\techo \"$ttt$sss$ttt\" >expect &&\n+\tgit stripspace <expect >actual &&\n+\ttest_cmp expect actual &&\n \n-    echo \"$ttt$sss$sss$ttt\" >expect &&\n-    git stripspace <expect >actual &&\n-    test_cmp expect actual\n+\techo \"$ttt$sss$sss$ttt\" >expect &&\n+\tgit stripspace <expect >actual &&\n+\ttest_cmp expect actual\n '\n \n-test_expect_success \\\n-    'consecutive blank lines should be unified' '\n-    printf \"$ttt\\n\\n$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\n\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+test_expect_success 'consecutive blank lines should be unified' '\n+\tprintf \"$ttt\\n\\n$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\n\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n-    printf \"$ttt$ttt\\n\\n\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n+\tprintf \"$ttt$ttt\\n\\n\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n-    printf \"$ttt$ttt$ttt\\n\\n\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n+\tprintf \"$ttt$ttt$ttt\\n\\n\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\n\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\\n$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\n\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n$ttt$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\n\\n\\n\\n$ttt$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\\n$ttt$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\n\\n\\n\\n$ttt$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n$ttt$ttt$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\n\\n\\n\\n$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\\n$ttt$ttt$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\n\\n\\n\\n$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\\n$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n-    printf \"$ttt$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n+\tprintf \"$ttt$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n-    printf \"$ttt$ttt$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n+\tprintf \"$ttt$ttt$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\\n$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n$ttt$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\\n$ttt$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n$ttt$ttt$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual\n+\tprintf \"$ttt\\n\\n$ttt$ttt$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual\n '\n \n-test_expect_success \\\n-    'only consecutive blank lines should be completely removed' '\n+test_expect_success 'only consecutive blank lines should be completely removed' '\n+\tprintf \"\\n\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"\\n\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\tprintf \"\\n\\n\\n\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"\\n\\n\\n\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\tprintf \"$sss\\n$sss\\n$sss\\n\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"$sss\\n$sss\\n$sss\\n\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\tprintf \"$sss$sss\\n$sss\\n\\n\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"$sss$sss\\n$sss\\n\\n\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\tprintf \"\\n$sss\\n$sss$sss\\n\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"\\n$sss\\n$sss$sss\\n\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\tprintf \"$sss$sss$sss$sss\\n\\n\\n\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"$sss$sss$sss$sss\\n\\n\\n\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\tprintf \"\\n$sss$sss$sss$sss\\n\\n\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"\\n$sss$sss$sss$sss\\n\\n\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n-\n-    printf \"\\n\\n$sss$sss$sss$sss\\n\" | git stripspace >actual &&\n-    test_must_be_empty actual\n+\tprintf \"\\n\\n$sss$sss$sss$sss\\n\" | git stripspace >actual &&\n+\ttest_must_be_empty actual\n '\n \n-test_expect_success \\\n-    'consecutive blank lines at the beginning should be removed' '\n-    printf \"$ttt\\n\" > expect &&\n-    printf \"\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+test_expect_success 'consecutive blank lines at the beginning should be removed' '\n+\tprintf \"$ttt\\n\" > expect &&\n+\tprintf \"\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\" > expect &&\n-    printf \"\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\" > expect &&\n+\tprintf \"\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt\\n\" > expect &&\n-    printf \"\\n\\n\\n$ttt$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt\\n\" > expect &&\n+\tprintf \"\\n\\n\\n$ttt$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt$ttt\\n\" > expect &&\n-    printf \"\\n\\n\\n$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt$ttt\\n\" > expect &&\n+\tprintf \"\\n\\n\\n$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt$ttt$ttt\\n\" > expect &&\n-    printf \"\\n\\n\\n$ttt$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt$ttt$ttt\\n\" > expect &&\n+\tprintf \"\\n\\n\\n$ttt$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\" > expect &&\n \n-    printf \"$sss\\n$sss\\n$sss\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$sss\\n$sss\\n$sss\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"\\n$sss\\n$sss$sss\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"\\n$sss\\n$sss$sss\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$sss$sss\\n$sss\\n\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$sss$sss\\n$sss\\n\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$sss$sss$sss\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$sss$sss$sss\\n\\n\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"\\n$sss$sss$sss\\n\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"\\n$sss$sss$sss\\n\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"\\n\\n$sss$sss$sss\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual\n+\tprintf \"\\n\\n$sss$sss$sss\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual\n '\n \n-test_expect_success \\\n-    'consecutive blank lines at the end should be removed' '\n-    printf \"$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+test_expect_success 'consecutive blank lines at the end should be removed' '\n+\tprintf \"$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\" > expect &&\n-    printf \"$ttt\\n\\n\\n\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\\n\\n\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt\\n\" > expect &&\n-    printf \"$ttt$ttt\\n\\n\\n\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt\\n\" > expect &&\n+\tprintf \"$ttt$ttt\\n\\n\\n\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt$ttt\\n\" > expect &&\n-    printf \"$ttt$ttt$ttt\\n\\n\\n\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt$ttt\\n\" > expect &&\n+\tprintf \"$ttt$ttt$ttt\\n\\n\\n\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt$ttt$ttt\\n\" > expect &&\n-    printf \"$ttt$ttt$ttt$ttt\\n\\n\\n\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt$ttt$ttt\\n\" > expect &&\n+\tprintf \"$ttt$ttt$ttt$ttt\\n\\n\\n\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\" > expect &&\n+\tprintf \"$ttt\\n\" > expect &&\n \n-    printf \"$ttt\\n$sss\\n$sss\\n$sss\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n$sss\\n$sss\\n$sss\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n$sss\\n$sss$sss\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\\n$sss\\n$sss$sss\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n$sss$sss\\n$sss\\n\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n$sss$sss\\n$sss\\n\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n$sss$sss$sss\\n\\n\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n$sss$sss$sss\\n\\n\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n$sss$sss$sss\\n\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\\n$sss$sss$sss\\n\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\\n\\n$sss$sss$sss\\n\" | git stripspace >actual &&\n-    test_cmp expect actual\n+\tprintf \"$ttt\\n\\n\\n$sss$sss$sss\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual\n '\n \n-test_expect_success \\\n-    'text without newline at end should end with newline' '\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt\" &&\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt\" &&\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$ttt\" &&\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$ttt$ttt\"\n+test_expect_success 'text without newline at end should end with newline' '\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt\" &&\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt\" &&\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$ttt\" &&\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$ttt$ttt\"\n '\n \n # text plus spaces at the end:\n \n-test_expect_success \\\n-    'text plus spaces without newline at end should end with newline' '\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$sss\" &&\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$sss\" &&\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$ttt$sss\" &&\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$sss$sss\" &&\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$sss$sss\" &&\n-    test_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$sss$sss$sss\"\n+test_expect_success 'text plus spaces without newline at end should end with newline' '\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$sss\" &&\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$sss\" &&\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$ttt$sss\" &&\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$sss$sss\" &&\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$ttt$sss$sss\" &&\n+\ttest_stdout_line_count -gt 0 printf_git_stripspace \"$ttt$sss$sss$sss\"\n '\n \n-test_expect_success \\\n-    'text plus spaces without newline at end should not show spaces' '\n-    printf \"$ttt$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    printf \"$ttt$ttt$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    printf \"$ttt$ttt$ttt$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    printf \"$ttt$sss$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    printf \"$ttt$ttt$sss$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    printf \"$ttt$sss$sss$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null\n+test_expect_success 'text plus spaces without newline at end should not show spaces' '\n+\tprintf \"$ttt$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\tprintf \"$ttt$ttt$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\tprintf \"$ttt$ttt$ttt$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\tprintf \"$ttt$sss$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\tprintf \"$ttt$ttt$sss$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\tprintf \"$ttt$sss$sss$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null\n '\n \n-test_expect_success \\\n-    'text plus spaces without newline should show the correct lines' '\n-    printf \"$ttt\\n\" >expect &&\n-    printf \"$ttt$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+test_expect_success 'text plus spaces without newline should show the correct lines' '\n+\tprintf \"$ttt\\n\" >expect &&\n+\tprintf \"$ttt$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\" >expect &&\n-    printf \"$ttt$sss$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\" >expect &&\n+\tprintf \"$ttt$sss$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n\" >expect &&\n-    printf \"$ttt$sss$sss$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n\" >expect &&\n+\tprintf \"$ttt$sss$sss$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt\\n\" >expect &&\n-    printf \"$ttt$ttt$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt\\n\" >expect &&\n+\tprintf \"$ttt$ttt$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt\\n\" >expect &&\n-    printf \"$ttt$ttt$sss$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt\\n\" >expect &&\n+\tprintf \"$ttt$ttt$sss$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt$ttt\\n\" >expect &&\n-    printf \"$ttt$ttt$ttt$sss\" | git stripspace >actual &&\n-    test_cmp expect actual\n+\tprintf \"$ttt$ttt$ttt\\n\" >expect &&\n+\tprintf \"$ttt$ttt$ttt$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual\n '\n \n-test_expect_success \\\n-    'text plus spaces at end should not show spaces' '\n-    echo \"$ttt$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    echo \"$ttt$ttt$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    echo \"$ttt$ttt$ttt$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    echo \"$ttt$sss$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    echo \"$ttt$ttt$sss$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null &&\n-    echo \"$ttt$sss$sss$sss\" | git stripspace >tmp &&\n-    ! grep \"  \" tmp >/dev/null\n+test_expect_success 'text plus spaces at end should not show spaces' '\n+\techo \"$ttt$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\techo \"$ttt$ttt$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\techo \"$ttt$ttt$ttt$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\techo \"$ttt$sss$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\techo \"$ttt$ttt$sss$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null &&\n+\techo \"$ttt$sss$sss$sss\" | git stripspace >tmp &&\n+\t! grep \"  \" tmp >/dev/null\n '\n \n-test_expect_success \\\n-    'text plus spaces at end should be cleaned and newline must remain' '\n-    echo \"$ttt\" >expect &&\n-    echo \"$ttt$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+test_expect_success 'text plus spaces at end should be cleaned and newline must remain' '\n+\techo \"$ttt\" >expect &&\n+\techo \"$ttt$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    echo \"$ttt\" >expect &&\n-    echo \"$ttt$sss$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\techo \"$ttt\" >expect &&\n+\techo \"$ttt$sss$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    echo \"$ttt\" >expect &&\n-    echo \"$ttt$sss$sss$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\techo \"$ttt\" >expect &&\n+\techo \"$ttt$sss$sss$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    echo \"$ttt$ttt\" >expect &&\n-    echo \"$ttt$ttt$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\techo \"$ttt$ttt\" >expect &&\n+\techo \"$ttt$ttt$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    echo \"$ttt$ttt\" >expect &&\n-    echo \"$ttt$ttt$sss$sss\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\techo \"$ttt$ttt\" >expect &&\n+\techo \"$ttt$ttt$sss$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    echo \"$ttt$ttt$ttt\" >expect &&\n-    echo \"$ttt$ttt$ttt$sss\" | git stripspace >actual &&\n-    test_cmp expect actual\n+\techo \"$ttt$ttt$ttt\" >expect &&\n+\techo \"$ttt$ttt$ttt$sss\" | git stripspace >actual &&\n+\ttest_cmp expect actual\n '\n \n # spaces only:\n \n-test_expect_success \\\n-    'spaces with newline at end should be replaced with empty string' '\n-    echo | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+test_expect_success 'spaces with newline at end should be replaced with empty string' '\n+\techo | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    echo \"$sss\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\techo \"$sss\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    echo \"$sss$sss\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\techo \"$sss$sss\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    echo \"$sss$sss$sss\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\techo \"$sss$sss$sss\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    echo \"$sss$sss$sss$sss\" | git stripspace >actual &&\n-    test_must_be_empty actual\n+\techo \"$sss$sss$sss$sss\" | git stripspace >actual &&\n+\ttest_must_be_empty actual\n '\n \n-test_expect_success \\\n-    'spaces without newline at end should not show spaces' '\n-    printf \"\" | git stripspace >tmp &&\n-    ! grep \" \" tmp >/dev/null &&\n-    printf \"$sss\" | git stripspace >tmp &&\n-    ! grep \" \" tmp >/dev/null &&\n-    printf \"$sss$sss\" | git stripspace >tmp &&\n-    ! grep \" \" tmp >/dev/null &&\n-    printf \"$sss$sss$sss\" | git stripspace >tmp &&\n-    ! grep \" \" tmp >/dev/null &&\n-    printf \"$sss$sss$sss$sss\" | git stripspace >tmp &&\n-    ! grep \" \" tmp >/dev/null\n+test_expect_success 'spaces without newline at end should not show spaces' '\n+\tprintf \"\" | git stripspace >tmp &&\n+\t! grep \" \" tmp >/dev/null &&\n+\tprintf \"$sss\" | git stripspace >tmp &&\n+\t! grep \" \" tmp >/dev/null &&\n+\tprintf \"$sss$sss\" | git stripspace >tmp &&\n+\t! grep \" \" tmp >/dev/null &&\n+\tprintf \"$sss$sss$sss\" | git stripspace >tmp &&\n+\t! grep \" \" tmp >/dev/null &&\n+\tprintf \"$sss$sss$sss$sss\" | git stripspace >tmp &&\n+\t! grep \" \" tmp >/dev/null\n '\n \n-test_expect_success \\\n-    'spaces without newline at end should be replaced with empty string' '\n-    printf \"\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+test_expect_success 'spaces without newline at end should be replaced with empty string' '\n+\tprintf \"\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"$sss$sss\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\tprintf \"$sss$sss\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"$sss$sss$sss\" | git stripspace >actual &&\n-    test_must_be_empty actual &&\n+\tprintf \"$sss$sss$sss\" | git stripspace >actual &&\n+\ttest_must_be_empty actual &&\n \n-    printf \"$sss$sss$sss$sss\" | git stripspace >actual &&\n-    test_must_be_empty actual\n+\tprintf \"$sss$sss$sss$sss\" | git stripspace >actual &&\n+\ttest_must_be_empty actual\n '\n \n-test_expect_success \\\n-    'consecutive text lines should be unchanged' '\n-    printf \"$ttt$ttt\\n$ttt\\n\" >expect &&\n-    printf \"$ttt$ttt\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+test_expect_success 'consecutive text lines should be unchanged' '\n+\tprintf \"$ttt$ttt\\n$ttt\\n\" >expect &&\n+\tprintf \"$ttt$ttt\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n$ttt$ttt\\n$ttt\\n\" >expect &&\n-    printf \"$ttt\\n$ttt$ttt\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n$ttt$ttt\\n$ttt\\n\" >expect &&\n+\tprintf \"$ttt\\n$ttt$ttt\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n$ttt\\n$ttt\\n$ttt$ttt\\n\" >expect &&\n-    printf \"$ttt\\n$ttt\\n$ttt\\n$ttt$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n$ttt\\n$ttt\\n$ttt$ttt\\n\" >expect &&\n+\tprintf \"$ttt\\n$ttt\\n$ttt\\n$ttt$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n$ttt\\n\\n$ttt$ttt\\n$ttt\\n\" >expect &&\n-    printf \"$ttt\\n$ttt\\n\\n$ttt$ttt\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt\\n$ttt\\n\\n$ttt$ttt\\n$ttt\\n\" >expect &&\n+\tprintf \"$ttt\\n$ttt\\n\\n$ttt$ttt\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt$ttt\\n\\n$ttt\\n$ttt$ttt\\n\" >expect &&\n-    printf \"$ttt$ttt\\n\\n$ttt\\n$ttt$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual &&\n+\tprintf \"$ttt$ttt\\n\\n$ttt\\n$ttt$ttt\\n\" >expect &&\n+\tprintf \"$ttt$ttt\\n\\n$ttt\\n$ttt$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual &&\n \n-    printf \"$ttt\\n$ttt$ttt\\n\\n$ttt\\n\" >expect &&\n-    printf \"$ttt\\n$ttt$ttt\\n\\n$ttt\\n\" | git stripspace >actual &&\n-    test_cmp expect actual\n+\tprintf \"$ttt\\n$ttt$ttt\\n\\n$ttt\\n\" >expect &&\n+\tprintf \"$ttt\\n$ttt$ttt\\n\\n$ttt\\n\" | git stripspace >actual &&\n+\ttest_cmp expect actual\n '\n \n test_expect_success 'strip comments, too' '\n-- \ngitgitgadget\n\n"},{"id":"477544","messageId":"6cdf6c0317fb5de93ea53b21d75933da151be2ee.1684440205.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 04/20] t1001-read-tree-m-2way: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:09Z","receivedAt":"2023-05-18T20:03:38Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests are still using the older four space indent format. Update\nthese to use tabs.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t1001-read-tree-m-2way.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh\nindex 3fb1b0c162d..88c524f6558 100755\n--- a/t/t1001-read-tree-m-2way.sh\n+++ b/t/t1001-read-tree-m-2way.sh\n@@ -26,7 +26,7 @@ TEST_PASSES_SANITIZE_LEAK=true\n . \"$TEST_DIRECTORY\"/lib-read-tree.sh\n \n read_tree_twoway () {\n-    git read-tree -m \"$1\" \"$2\" && git ls-files --stage\n+\tgit read-tree -m \"$1\" \"$2\" && git ls-files --stage\n }\n \n compare_change () {\n-- \ngitgitgadget\n\n"},{"id":"477545","messageId":"4fe5e5cf9e068d20bbec3580df3030cd74ca4122.1684440205.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 03/20] t3210-pack-refs: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:08Z","receivedAt":"2023-05-18T20:03:41Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests in t3210-pack-refs.sh used the older four space indent format.\nUpdate these to use tabs.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t3210-pack-refs.sh | 154 +++++++++++++++++++++----------------------\n 1 file changed, 77 insertions(+), 77 deletions(-)\n\ndiff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh\nindex 07a0ff93def..4e449ecffc4 100755\n--- a/t/t3210-pack-refs.sh\n+++ b/t/t3210-pack-refs.sh\n@@ -19,101 +19,101 @@ test_expect_success 'enable reflogs' '\n \tgit config core.logallrefupdates true\n '\n \n-test_expect_success \\\n-    'prepare a trivial repository' \\\n-    'echo Hello > A &&\n-     git update-index --add A &&\n-     git commit -m \"Initial commit.\" &&\n-     HEAD=$(git rev-parse --verify HEAD)'\n+test_expect_success 'prepare a trivial repository' '\n+\techo Hello > A &&\n+\tgit update-index --add A &&\n+\tgit commit -m \"Initial commit.\" &&\n+\tHEAD=$(git rev-parse --verify HEAD)\n+'\n \n SHA1=\n \n-test_expect_success \\\n-    'see if git show-ref works as expected' \\\n-    'git branch a &&\n-     SHA1=$(cat .git/refs/heads/a) &&\n-     echo \"$SHA1 refs/heads/a\" >expect &&\n-     git show-ref a >result &&\n-     test_cmp expect result'\n-\n-test_expect_success \\\n-    'see if a branch still exists when packed' \\\n-    'git branch b &&\n-     git pack-refs --all &&\n-     rm -f .git/refs/heads/b &&\n-     echo \"$SHA1 refs/heads/b\" >expect &&\n-     git show-ref b >result &&\n-     test_cmp expect result'\n+test_expect_success 'see if git show-ref works as expected' '\n+\tgit branch a &&\n+\tSHA1=$(cat .git/refs/heads/a) &&\n+\techo \"$SHA1 refs/heads/a\" >expect &&\n+\tgit show-ref a >result &&\n+\ttest_cmp expect result\n+'\n+\n+test_expect_success 'see if a branch still exists when packed' '\n+\tgit branch b &&\n+\tgit pack-refs --all &&\n+\trm -f .git/refs/heads/b &&\n+\techo \"$SHA1 refs/heads/b\" >expect &&\n+\tgit show-ref b >result &&\n+\ttest_cmp expect result\n+'\n \n test_expect_success 'git branch c/d should barf if branch c exists' '\n-     git branch c &&\n-     git pack-refs --all &&\n-     rm -f .git/refs/heads/c &&\n-     test_must_fail git branch c/d\n+\tgit branch c &&\n+\tgit pack-refs --all &&\n+\trm -f .git/refs/heads/c &&\n+\ttest_must_fail git branch c/d\n '\n \n-test_expect_success \\\n-    'see if a branch still exists after git pack-refs --prune' \\\n-    'git branch e &&\n-     git pack-refs --all --prune &&\n-     echo \"$SHA1 refs/heads/e\" >expect &&\n-     git show-ref e >result &&\n-     test_cmp expect result'\n+test_expect_success 'see if a branch still exists after git pack-refs --prune' '\n+\tgit branch e &&\n+\tgit pack-refs --all --prune &&\n+\techo \"$SHA1 refs/heads/e\" >expect &&\n+\tgit show-ref e >result &&\n+\ttest_cmp expect result\n+'\n \n test_expect_success 'see if git pack-refs --prune remove ref files' '\n-     git branch f &&\n-     git pack-refs --all --prune &&\n-     ! test -f .git/refs/heads/f\n+\tgit branch f &&\n+\tgit pack-refs --all --prune &&\n+\t! test -f .git/refs/heads/f\n '\n \n test_expect_success 'see if git pack-refs --prune removes empty dirs' '\n-     git branch r/s/t &&\n-     git pack-refs --all --prune &&\n-     ! test -e .git/refs/heads/r\n+\tgit branch r/s/t &&\n+\tgit pack-refs --all --prune &&\n+\t! test -e .git/refs/heads/r\n '\n \n-test_expect_success \\\n-    'git branch g should work when git branch g/h has been deleted' \\\n-    'git branch g/h &&\n-     git pack-refs --all --prune &&\n-     git branch -d g/h &&\n-     git branch g &&\n-     git pack-refs --all &&\n-     git branch -d g'\n+test_expect_success 'git branch g should work when git branch g/h has been deleted' '\n+\tgit branch g/h &&\n+\tgit pack-refs --all --prune &&\n+\tgit branch -d g/h &&\n+\tgit branch g &&\n+\tgit pack-refs --all &&\n+\tgit branch -d g\n+'\n \n test_expect_success 'git branch i/j/k should barf if branch i exists' '\n-     git branch i &&\n-     git pack-refs --all --prune &&\n-     test_must_fail git branch i/j/k\n+\tgit branch i &&\n+\tgit pack-refs --all --prune &&\n+\ttest_must_fail git branch i/j/k\n+'\n+\n+test_expect_success 'test git branch k after branch k/l/m and k/lm have been deleted' '\n+\tgit branch k/l &&\n+\tgit branch k/lm &&\n+\tgit branch -d k/l &&\n+\tgit branch k/l/m &&\n+\tgit branch -d k/l/m &&\n+\tgit branch -d k/lm &&\n+\tgit branch k\n '\n \n-test_expect_success \\\n-    'test git branch k after branch k/l/m and k/lm have been deleted' \\\n-    'git branch k/l &&\n-     git branch k/lm &&\n-     git branch -d k/l &&\n-     git branch k/l/m &&\n-     git branch -d k/l/m &&\n-     git branch -d k/lm &&\n-     git branch k'\n-\n-test_expect_success \\\n-    'test git branch n after some branch deletion and pruning' \\\n-    'git branch n/o &&\n-     git branch n/op &&\n-     git branch -d n/o &&\n-     git branch n/o/p &&\n-     git branch -d n/op &&\n-     git pack-refs --all --prune &&\n-     git branch -d n/o/p &&\n-     git branch n'\n-\n-test_expect_success \\\n-\t'see if up-to-date packed refs are preserved' \\\n-\t'git branch q &&\n-\t git pack-refs --all --prune &&\n-\t git update-ref refs/heads/q refs/heads/q &&\n-\t ! test -f .git/refs/heads/q'\n+test_expect_success 'test git branch n after some branch deletion and pruning' '\n+\tgit branch n/o &&\n+\tgit branch n/op &&\n+\tgit branch -d n/o &&\n+\tgit branch n/o/p &&\n+\tgit branch -d n/op &&\n+\tgit pack-refs --all --prune &&\n+\tgit branch -d n/o/p &&\n+\tgit branch n\n+'\n+\n+test_expect_success A'see if up-to-date packed refs are preserved' '\n+\tgit branch q &&\n+\tgit pack-refs --all --prune &&\n+\tgit update-ref refs/heads/q refs/heads/q &&\n+\t! test -f .git/refs/heads/q\n+'\n \n test_expect_success 'pack, prune and repack' '\n \tgit tag foo &&\n-- \ngitgitgadget\n\n"},{"id":"477546","messageId":"21d3a2e2025e4add8744ec250f1b65fbd228a315.1684440205.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 06/20] t1006-cat-file: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:11Z","receivedAt":"2023-05-18T20:03:43Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests in t1006-cat-file.sh used the older four space indent format.\nUpdate these to use tabs.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t1006-cat-file.sh | 26 +++++++++++++-------------\n 1 file changed, 13 insertions(+), 13 deletions(-)\n\ndiff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh\nindex 8eac74b59c2..2e70490a30d 100755\n--- a/t/t1006-cat-file.sh\n+++ b/t/t1006-cat-file.sh\n@@ -351,30 +351,30 @@ do\n done\n \n test_expect_success \"--batch-check for a non-existent named object\" '\n-    test \"foobar42 missing\n+\ttest \"foobar42 missing\n foobar84 missing\" = \\\n-    \"$( ( echo foobar42 && echo_without_newline foobar84 ) | git cat-file --batch-check)\"\n+\t\"$( ( echo foobar42 && echo_without_newline foobar84 ) | git cat-file --batch-check)\"\n '\n \n test_expect_success \"--batch-check for a non-existent hash\" '\n-    test \"0000000000000000000000000000000000000042 missing\n+\ttest \"0000000000000000000000000000000000000042 missing\n 0000000000000000000000000000000000000084 missing\" = \\\n     \"$( ( echo 0000000000000000000000000000000000000042 &&\n \t echo_without_newline 0000000000000000000000000000000000000084 ) |\n-       git cat-file --batch-check)\"\n+\tgit cat-file --batch-check)\"\n '\n \n test_expect_success \"--batch for an existent and a non-existent hash\" '\n-    test \"$tag_sha1 tag $tag_size\n+\ttest \"$tag_sha1 tag $tag_size\n $tag_content\n 0000000000000000000000000000000000000000 missing\" = \\\n-    \"$( ( echo $tag_sha1 &&\n-\t echo_without_newline 0000000000000000000000000000000000000000 ) |\n-       git cat-file --batch)\"\n+\t\"$( ( echo $tag_sha1 &&\n+\techo_without_newline 0000000000000000000000000000000000000000 ) |\n+\tgit cat-file --batch)\"\n '\n \n test_expect_success \"--batch-check for an empty line\" '\n-    test \" missing\" = \"$(echo | git cat-file --batch-check)\"\n+\ttest \" missing\" = \"$(echo | git cat-file --batch-check)\"\n '\n \n test_expect_success 'empty --batch-check notices missing object' '\n@@ -425,13 +425,13 @@ deadbeef missing\n  missing\"\n \n test_expect_success \"--batch-check with multiple sha1s gives correct format\" '\n-    test \"$batch_check_output\" = \\\n-    \"$(echo_without_newline \"$batch_check_input\" | git cat-file --batch-check)\"\n+\ttest \"$batch_check_output\" = \\\n+\t\"$(echo_without_newline \"$batch_check_input\" | git cat-file --batch-check)\"\n '\n \n test_expect_success \"--batch-check, -z with multiple sha1s gives correct format\" '\n-    echo_without_newline_nul \"$batch_check_input\" >in &&\n-    test \"$batch_check_output\" = \"$(git cat-file --batch-check -z <in)\"\n+\techo_without_newline_nul \"$batch_check_input\" >in &&\n+\ttest \"$batch_check_output\" = \"$(git cat-file --batch-check -z <in)\"\n '\n \n test_expect_success FUNNYNAMES '--batch-check, -z with newline in input' '\n-- \ngitgitgadget\n\n"},{"id":"477547","messageId":"3aa5c1650622b59b85861ced9527781f30252333.1684440205.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 07/20] t3500-cherry: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:12Z","receivedAt":"2023-05-18T20:03:44Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t3500-cherry.sh | 69 +++++++++++++++++++++++------------------------\n 1 file changed, 33 insertions(+), 36 deletions(-)\n\ndiff --git a/t/t3500-cherry.sh b/t/t3500-cherry.sh\nindex 0458a58b4b5..78c3eac54b5 100755\n--- a/t/t3500-cherry.sh\n+++ b/t/t3500-cherry.sh\n@@ -16,46 +16,43 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n GIT_AUTHOR_EMAIL=bogus_email_address\n export GIT_AUTHOR_EMAIL\n \n-test_expect_success \\\n-    'prepare repository with topic branch, and check cherry finds the 2 patches from there' \\\n-    'echo First > A &&\n-     git update-index --add A &&\n-     test_tick &&\n-     git commit -m \"Add A.\" &&\n-\n-     git checkout -b my-topic-branch &&\n-\n-     echo Second > B &&\n-     git update-index --add B &&\n-     test_tick &&\n-     git commit -m \"Add B.\" &&\n-\n-     echo AnotherSecond > C &&\n-     git update-index --add C &&\n-     test_tick &&\n-     git commit -m \"Add C.\" &&\n-\n-     git checkout -f main &&\n-     rm -f B C &&\n-\n-     echo Third >> A &&\n-     git update-index A &&\n-     test_tick &&\n-     git commit -m \"Modify A.\" &&\n-\n-     expr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* + .*\"\n+test_expect_success 'prepare repository with topic branch, and check cherry finds the 2 patches from there' '\n+\techo First > A &&\n+\tgit update-index --add A &&\n+\ttest_tick &&\n+\tgit commit -m \"Add A.\" &&\n+\n+\tgit checkout -b my-topic-branch &&\n+\n+\techo Second > B &&\n+\tgit update-index --add B &&\n+\ttest_tick &&\n+\tgit commit -m \"Add B.\" &&\n+\n+\techo AnotherSecond > C &&\n+\tgit update-index --add C &&\n+\ttest_tick &&\n+\tgit commit -m \"Add C.\" &&\n+\n+\tgit checkout -f main &&\n+\trm -f B C &&\n+\n+\techo Third >> A &&\n+\tgit update-index A &&\n+\ttest_tick &&\n+\tgit commit -m \"Modify A.\" &&\n+\n+\texpr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* + .*\"\n '\n \n-test_expect_success \\\n-    'check that cherry with limit returns only the top patch'\\\n-    'expr \"$(echo $(git cherry main my-topic-branch my-topic-branch^1) )\" : \"+ [^ ]*\"\n+test_expect_success 'check that cherry with limit returns only the top patch' '\n+\texpr \"$(echo $(git cherry main my-topic-branch my-topic-branch^1) )\" : \"+ [^ ]*\"\n '\n \n-test_expect_success \\\n-    'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \\\n-    'git cherry-pick my-topic-branch^0 &&\n-     echo $(git cherry main my-topic-branch) &&\n-     expr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* - .*\"\n+test_expect_success 'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' '\n+\tgit cherry-pick my-topic-branch^0 &&\n+\techo $(git cherry main my-topic-branch) &&\n+\texpr \"$(echo $(git cherry main my-topic-branch) )\" : \"+ [^ ]* - .*\"\n '\n \n test_expect_success 'cherry ignores whitespace' '\n-- \ngitgitgadget\n\n"},{"id":"477548","messageId":"01330c096c861a35a04ad91c7aaf0b9061c1fa02.1684440205.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 08/20] t3700-add: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:13Z","receivedAt":"2023-05-18T20:03:47Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t3700-add.sh | 34 +++++++++++++++++-----------------\n 1 file changed, 17 insertions(+), 17 deletions(-)\n\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 82dd768944f..7623689da24 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -24,17 +24,17 @@ test_mode_in_index () {\n \tesac\n }\n \n-test_expect_success \\\n-    'Test of git add' \\\n-    'touch foo && git add foo'\n+test_expect_success 'Test of git add' '\n+\ttouch foo && git add foo\n+'\n \n-test_expect_success \\\n-    'Post-check that foo is in the index' \\\n-    'git ls-files foo | grep foo'\n+test_expect_success 'Post-check that foo is in the index' '\n+\tgit ls-files foo | grep foo\n+'\n \n-test_expect_success \\\n-    'Test that \"git add -- -q\" works' \\\n-    'touch -- -q && git add -- -q'\n+test_expect_success 'Test that \"git add -- -q\" works' '\n+\ttouch -- -q && git add -- -q\n+'\n \n BATCH_CONFIGURATION='-c core.fsync=loose-object -c core.fsyncmethod=batch'\n \n@@ -284,14 +284,14 @@ test_expect_success POSIXPERM,SANITY 'git add (add.ignore-errors = false)' '\n rm -f foo2\n \n test_expect_success POSIXPERM,SANITY '--no-ignore-errors overrides config' '\n-       git config add.ignore-errors 1 &&\n-       git reset --hard &&\n-       date >foo1 &&\n-       date >foo2 &&\n-       chmod 0 foo2 &&\n-       test_must_fail git add --verbose --no-ignore-errors . &&\n-       ! ( git ls-files foo1 | grep foo1 ) &&\n-       git config add.ignore-errors 0\n+\tgit config add.ignore-errors 1 &&\n+\tgit reset --hard &&\n+\tdate >foo1 &&\n+\tdate >foo2 &&\n+\tchmod 0 foo2 &&\n+\ttest_must_fail git add --verbose --no-ignore-errors . &&\n+\t! ( git ls-files foo1 | grep foo1 ) &&\n+\tgit config add.ignore-errors 0\n '\n rm -f foo2\n \n-- \ngitgitgadget\n\n"},{"id":"477549","messageId":"7fba1d22053f514b2defafed24b6eb5808cda1de.1684440205.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 05/20] t1002-read-tree-m-u-2way: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:10Z","receivedAt":"2023-05-18T20:03:54Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests are still using the older four space indent format. Update\nthese to use tabs.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t1002-read-tree-m-u-2way.sh | 589 +++++++++++++++++-----------------\n 1 file changed, 293 insertions(+), 296 deletions(-)\n\ndiff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh\nindex cdc077ce12d..a7c2ed0d7c0 100755\n--- a/t/t1002-read-tree-m-u-2way.sh\n+++ b/t/t1002-read-tree-m-u-2way.sh\n@@ -37,315 +37,312 @@ check_cache_at () {\n \tesac\n }\n \n-test_expect_success \\\n-    setup \\\n-    'echo frotz >frotz &&\n-     echo nitfol >nitfol &&\n-     echo bozbar >bozbar &&\n-     echo rezrov >rezrov &&\n-     git update-index --add nitfol bozbar rezrov &&\n-     treeH=$(git write-tree) &&\n-     echo treeH $treeH &&\n-     git ls-tree $treeH &&\n-\n-     echo gnusto >bozbar &&\n-     git update-index --add frotz bozbar --force-remove rezrov &&\n-     git ls-files --stage >M.out &&\n-     treeM=$(git write-tree) &&\n-     echo treeM $treeM &&\n-     git ls-tree $treeM &&\n-     cp bozbar bozbar.M &&\n-     cp frotz frotz.M &&\n-     cp nitfol nitfol.M &&\n-     git diff-tree $treeH $treeM'\n-\n-test_expect_success \\\n-    '1, 2, 3 - no carry forward' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >1-3.out &&\n-     cmp M.out 1-3.out &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp frotz.M frotz &&\n-     test_cmp nitfol.M nitfol &&\n-     check_cache_at bozbar clean &&\n-     check_cache_at frotz clean &&\n-     check_cache_at nitfol clean'\n-\n-test_expect_success \\\n-    '4 - carry forward local addition.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo \"+100644 X 0\tyomin\" >expected &&\n-     echo yomin >yomin &&\n-     git update-index --add yomin &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >4.out &&\n-     test_might_fail git diff -U0 --no-index M.out 4.out >4diff.out &&\n-     compare_change 4diff.out expected &&\n-     check_cache_at yomin clean &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp frotz.M frotz &&\n-     test_cmp nitfol.M nitfol &&\n-     echo yomin >yomin1 &&\n-     diff yomin yomin1 &&\n-     rm -f yomin1'\n-\n-test_expect_success \\\n-    '5 - carry forward local addition.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     read_tree_u_must_succeed -m -u $treeH &&\n-     echo yomin >yomin &&\n-     git update-index --add yomin &&\n-     echo yomin yomin >yomin &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >5.out &&\n-     test_might_fail git diff -U0 --no-index M.out 5.out >5diff.out &&\n-     compare_change 5diff.out expected &&\n-     check_cache_at yomin dirty &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp frotz.M frotz &&\n-     test_cmp nitfol.M nitfol &&\n-     : dirty index should have prevented -u from checking it out. &&\n-     echo yomin yomin >yomin1 &&\n-     diff yomin yomin1 &&\n-     rm -f yomin1'\n-\n-test_expect_success \\\n-    '6 - local addition already has the same.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo frotz >frotz &&\n-     git update-index --add frotz &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >6.out &&\n-     test_cmp M.out 6.out &&\n-     check_cache_at frotz clean &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp frotz.M frotz &&\n-     test_cmp nitfol.M nitfol &&\n-     echo frotz >frotz1 &&\n-     diff frotz frotz1 &&\n-     rm -f frotz1'\n-\n-test_expect_success \\\n-    '7 - local addition already has the same.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo frotz >frotz &&\n-     git update-index --add frotz &&\n-     echo frotz frotz >frotz &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >7.out &&\n-     test_cmp M.out 7.out &&\n-     check_cache_at frotz dirty &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp nitfol.M nitfol &&\n-     : dirty index should have prevented -u from checking it out. &&\n-     echo frotz frotz >frotz1 &&\n-     diff frotz frotz1 &&\n-     rm -f frotz1'\n-\n-test_expect_success \\\n-    '8 - conflicting addition.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo frotz frotz >frotz &&\n-     git update-index --add frotz &&\n-     ! read_tree_u_must_succeed -m -u $treeH $treeM'\n-\n-test_expect_success \\\n-    '9 - conflicting addition.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo frotz frotz >frotz &&\n-     git update-index --add frotz &&\n-     echo frotz >frotz &&\n-     ! read_tree_u_must_succeed -m -u $treeH $treeM'\n-\n-test_expect_success \\\n-    '10 - path removed.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo rezrov >rezrov &&\n-     git update-index --add rezrov &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >10.out &&\n-     cmp M.out 10.out &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp frotz.M frotz &&\n-     test_cmp nitfol.M nitfol\n+test_expect_success setup '\n+\techo frotz >frotz &&\n+\techo nitfol >nitfol &&\n+\techo bozbar >bozbar &&\n+\techo rezrov >rezrov &&\n+\tgit update-index --add nitfol bozbar rezrov &&\n+\ttreeH=$(git write-tree) &&\n+\techo treeH $treeH &&\n+\tgit ls-tree $treeH &&\n+\n+\techo gnusto >bozbar &&\n+\tgit update-index --add frotz bozbar --force-remove rezrov &&\n+\tgit ls-files --stage >M.out &&\n+\ttreeM=$(git write-tree) &&\n+\techo treeM $treeM &&\n+\tgit ls-tree $treeM &&\n+\tcp bozbar bozbar.M &&\n+\tcp frotz frotz.M &&\n+\tcp nitfol nitfol.M &&\n+\tgit diff-tree $treeH $treeM\n '\n \n-test_expect_success \\\n-    '11 - dirty path removed.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo rezrov >rezrov &&\n-     git update-index --add rezrov &&\n-     echo rezrov rezrov >rezrov &&\n-     ! read_tree_u_must_succeed -m -u $treeH $treeM'\n-\n-test_expect_success \\\n-    '12 - unmatching local changes being removed.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo rezrov rezrov >rezrov &&\n-     git update-index --add rezrov &&\n-     ! read_tree_u_must_succeed -m -u $treeH $treeM'\n-\n-test_expect_success \\\n-    '13 - unmatching local changes being removed.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo rezrov rezrov >rezrov &&\n-     git update-index --add rezrov &&\n-     echo rezrov >rezrov &&\n-     ! read_tree_u_must_succeed -m -u $treeH $treeM'\n+test_expect_success '1, 2, 3 - no carry forward' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >1-3.out &&\n+\tcmp M.out 1-3.out &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp frotz.M frotz &&\n+\ttest_cmp nitfol.M nitfol &&\n+\tcheck_cache_at bozbar clean &&\n+\tcheck_cache_at frotz clean &&\n+\tcheck_cache_at nitfol clean\n+'\n+\n+test_expect_success '4 - carry forward local addition.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo \"+100644 X 0\tyomin\" >expected &&\n+\techo yomin >yomin &&\n+\tgit update-index --add yomin &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >4.out &&\n+\ttest_might_fail git diff -U0 --no-index M.out 4.out >4diff.out &&\n+\tcompare_change 4diff.out expected &&\n+\tcheck_cache_at yomin clean &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp frotz.M frotz &&\n+\ttest_cmp nitfol.M nitfol &&\n+\techo yomin >yomin1 &&\n+\tdiff yomin yomin1 &&\n+\trm -f yomin1\n+'\n+\n+test_expect_success '5 - carry forward local addition.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\tread_tree_u_must_succeed -m -u $treeH &&\n+\techo yomin >yomin &&\n+\tgit update-index --add yomin &&\n+\techo yomin yomin >yomin &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >5.out &&\n+\ttest_might_fail git diff -U0 --no-index M.out 5.out >5diff.out &&\n+\tcompare_change 5diff.out expected &&\n+\tcheck_cache_at yomin dirty &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp frotz.M frotz &&\n+\ttest_cmp nitfol.M nitfol &&\n+\t: dirty index should have prevented -u from checking it out. &&\n+\techo yomin yomin >yomin1 &&\n+\tdiff yomin yomin1 &&\n+\trm -f yomin1\n+'\n+\n+test_expect_success '6 - local addition already has the same.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo frotz >frotz &&\n+\tgit update-index --add frotz &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >6.out &&\n+\ttest_cmp M.out 6.out &&\n+\tcheck_cache_at frotz clean &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp frotz.M frotz &&\n+\ttest_cmp nitfol.M nitfol &&\n+\techo frotz >frotz1 &&\n+\tdiff frotz frotz1 &&\n+\trm -f frotz1\n+'\n+\n+test_expect_success '7 - local addition already has the same.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo frotz >frotz &&\n+\tgit update-index --add frotz &&\n+\techo frotz frotz >frotz &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >7.out &&\n+\ttest_cmp M.out 7.out &&\n+\tcheck_cache_at frotz dirty &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp nitfol.M nitfol &&\n+\t: dirty index should have prevented -u from checking it out. &&\n+\techo frotz frotz >frotz1 &&\n+\tdiff frotz frotz1 &&\n+\trm -f frotz1\n+'\n+\n+test_expect_success '8 - conflicting addition.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo frotz frotz >frotz &&\n+\tgit update-index --add frotz &&\n+\t! read_tree_u_must_succeed -m -u $treeH $treeM\n+'\n+\n+test_expect_success '9 - conflicting addition.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo frotz frotz >frotz &&\n+\tgit update-index --add frotz &&\n+\techo frotz >frotz &&\n+\t! read_tree_u_must_succeed -m -u $treeH $treeM\n+'\n+\n+test_expect_success '10 - path removed.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo rezrov >rezrov &&\n+\tgit update-index --add rezrov &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >10.out &&\n+\tcmp M.out 10.out &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp frotz.M frotz &&\n+\ttest_cmp nitfol.M nitfol\n+'\n+\n+test_expect_success '11 - dirty path removed.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo rezrov >rezrov &&\n+\tgit update-index --add rezrov &&\n+\techo rezrov rezrov >rezrov &&\n+\t! read_tree_u_must_succeed -m -u $treeH $treeM\n+'\n+\n+test_expect_success '12 - unmatching local changes being removed.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo rezrov rezrov >rezrov &&\n+\tgit update-index --add rezrov &&\n+\t! read_tree_u_must_succeed -m -u $treeH $treeM\n+'\n+\n+test_expect_success '13 - unmatching local changes being removed.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo rezrov rezrov >rezrov &&\n+\tgit update-index --add rezrov &&\n+\techo rezrov >rezrov &&\n+\t! read_tree_u_must_succeed -m -u $treeH $treeM\n+'\n \n cat >expected <<EOF\n -100644 X 0\tnitfol\n +100644 X 0\tnitfol\n EOF\n \n-test_expect_success \\\n-    '14 - unchanged in two heads.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo nitfol nitfol >nitfol &&\n-     git update-index --add nitfol &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >14.out &&\n-     test_must_fail git diff -U0 --no-index M.out 14.out >14diff.out &&\n-     compare_change 14diff.out expected &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp frotz.M frotz &&\n-     check_cache_at nitfol clean &&\n-     echo nitfol nitfol >nitfol1 &&\n-     diff nitfol nitfol1 &&\n-     rm -f nitfol1'\n-\n-test_expect_success \\\n-    '15 - unchanged in two heads.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo nitfol nitfol >nitfol &&\n-     git update-index --add nitfol &&\n-     echo nitfol nitfol nitfol >nitfol &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >15.out &&\n-     test_must_fail git diff -U0 --no-index M.out 15.out >15diff.out &&\n-     compare_change 15diff.out expected &&\n-     check_cache_at nitfol dirty &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp frotz.M frotz &&\n-     echo nitfol nitfol nitfol >nitfol1 &&\n-     diff nitfol nitfol1 &&\n-     rm -f nitfol1'\n-\n-test_expect_success \\\n-    '16 - conflicting local change.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo bozbar bozbar >bozbar &&\n-     git update-index --add bozbar &&\n-     ! read_tree_u_must_succeed -m -u $treeH $treeM'\n-\n-test_expect_success \\\n-    '17 - conflicting local change.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo bozbar bozbar >bozbar &&\n-     git update-index --add bozbar &&\n-     echo bozbar bozbar bozbar >bozbar &&\n-     ! read_tree_u_must_succeed -m -u $treeH $treeM'\n-\n-test_expect_success \\\n-    '18 - local change already having a good result.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo gnusto >bozbar &&\n-     git update-index --add bozbar &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >18.out &&\n-     test_cmp M.out 18.out &&\n-     check_cache_at bozbar clean &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp frotz.M frotz &&\n-     test_cmp nitfol.M nitfol\n+test_expect_success '14 - unchanged in two heads.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo nitfol nitfol >nitfol &&\n+\tgit update-index --add nitfol &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >14.out &&\n+\ttest_must_fail git diff -U0 --no-index M.out 14.out >14diff.out &&\n+\tcompare_change 14diff.out expected &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp frotz.M frotz &&\n+\tcheck_cache_at nitfol clean &&\n+\techo nitfol nitfol >nitfol1 &&\n+\tdiff nitfol nitfol1 &&\n+\trm -f nitfol1\n '\n \n-test_expect_success \\\n-    '19 - local change already having a good result, further modified.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo gnusto >bozbar &&\n-     git update-index --add bozbar &&\n-     echo gnusto gnusto >bozbar &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >19.out &&\n-     test_cmp M.out 19.out &&\n-     check_cache_at bozbar dirty &&\n-     test_cmp frotz.M frotz &&\n-     test_cmp nitfol.M nitfol &&\n-     echo gnusto gnusto >bozbar1 &&\n-     diff bozbar bozbar1 &&\n-     rm -f bozbar1'\n-\n-test_expect_success \\\n-    '20 - no local change, use new tree.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo bozbar >bozbar &&\n-     git update-index --add bozbar &&\n-     read_tree_u_must_succeed -m -u $treeH $treeM &&\n-     git ls-files --stage >20.out &&\n-     test_cmp M.out 20.out &&\n-     check_cache_at bozbar clean &&\n-     test_cmp bozbar.M bozbar &&\n-     test_cmp frotz.M frotz &&\n-     test_cmp nitfol.M nitfol\n+test_expect_success '15 - unchanged in two heads.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo nitfol nitfol >nitfol &&\n+\tgit update-index --add nitfol &&\n+\techo nitfol nitfol nitfol >nitfol &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >15.out &&\n+\ttest_must_fail git diff -U0 --no-index M.out 15.out >15diff.out &&\n+\tcompare_change 15diff.out expected &&\n+\tcheck_cache_at nitfol dirty &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp frotz.M frotz &&\n+\techo nitfol nitfol nitfol >nitfol1 &&\n+\tdiff nitfol nitfol1 &&\n+\trm -f nitfol1\n '\n \n-test_expect_success \\\n-    '21 - no local change, dirty cache.' \\\n-    'rm -f .git/index nitfol bozbar rezrov frotz &&\n-     read_tree_u_must_succeed --reset -u $treeH &&\n-     echo bozbar >bozbar &&\n-     git update-index --add bozbar &&\n-     echo gnusto gnusto >bozbar &&\n-     ! read_tree_u_must_succeed -m -u $treeH $treeM'\n+test_expect_success '16 - conflicting local change.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo bozbar bozbar >bozbar &&\n+\tgit update-index --add bozbar &&\n+\t! read_tree_u_must_succeed -m -u $treeH $treeM\n+'\n+\n+test_expect_success '17 - conflicting local change.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo bozbar bozbar >bozbar &&\n+\tgit update-index --add bozbar &&\n+\techo bozbar bozbar bozbar >bozbar &&\n+\t! read_tree_u_must_succeed -m -u $treeH $treeM\n+'\n+\n+test_expect_success '18 - local change already having a good result.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo gnusto >bozbar &&\n+\tgit update-index --add bozbar &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >18.out &&\n+\ttest_cmp M.out 18.out &&\n+\tcheck_cache_at bozbar clean &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp frotz.M frotz &&\n+\ttest_cmp nitfol.M nitfol\n+'\n+\n+test_expect_success '19 - local change already having a good result, further modified.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo gnusto >bozbar &&\n+\tgit update-index --add bozbar &&\n+\techo gnusto gnusto >bozbar &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >19.out &&\n+\ttest_cmp M.out 19.out &&\n+\tcheck_cache_at bozbar dirty &&\n+\ttest_cmp frotz.M frotz &&\n+\ttest_cmp nitfol.M nitfol &&\n+\techo gnusto gnusto >bozbar1 &&\n+\tdiff bozbar bozbar1 &&\n+\trm -f bozbar1\n+'\n+\n+test_expect_success '20 - no local change, use new tree.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo bozbar >bozbar &&\n+\tgit update-index --add bozbar &&\n+\tread_tree_u_must_succeed -m -u $treeH $treeM &&\n+\tgit ls-files --stage >20.out &&\n+\ttest_cmp M.out 20.out &&\n+\tcheck_cache_at bozbar clean &&\n+\ttest_cmp bozbar.M bozbar &&\n+\ttest_cmp frotz.M frotz &&\n+\ttest_cmp nitfol.M nitfol\n+'\n+\n+test_expect_success '21 - no local change, dirty cache.' '\n+\trm -f .git/index nitfol bozbar rezrov frotz &&\n+\tread_tree_u_must_succeed --reset -u $treeH &&\n+\techo bozbar >bozbar &&\n+\tgit update-index --add bozbar &&\n+\techo gnusto gnusto >bozbar &&\n+\t! read_tree_u_must_succeed -m -u $treeH $treeM\n+'\n \n # Also make sure we did not break DF vs DF/DF case.\n-test_expect_success \\\n-    'DF vs DF/DF case setup.' \\\n-    'rm -f .git/index &&\n-     echo DF >DF &&\n-     git update-index --add DF &&\n-     treeDF=$(git write-tree) &&\n-     echo treeDF $treeDF &&\n-     git ls-tree $treeDF &&\n-\n-     rm -f DF &&\n-     mkdir DF &&\n-     echo DF/DF >DF/DF &&\n-     git update-index --add --remove DF DF/DF &&\n-     treeDFDF=$(git write-tree) &&\n-     echo treeDFDF $treeDFDF &&\n-     git ls-tree $treeDFDF &&\n-     git ls-files --stage >DFDF.out'\n-\n-test_expect_success \\\n-    'DF vs DF/DF case test.' \\\n-    'rm -f .git/index &&\n-     rm -fr DF &&\n-     echo DF >DF &&\n-     git update-index --add DF &&\n-     read_tree_u_must_succeed -m -u $treeDF $treeDFDF &&\n-     git ls-files --stage >DFDFcheck.out &&\n-     test_cmp DFDF.out DFDFcheck.out &&\n-     check_cache_at DF/DF clean'\n+test_expect_success 'DF vs DF/DF case setup.' '\n+\trm -f .git/index &&\n+\techo DF >DF &&\n+\tgit update-index --add DF &&\n+\ttreeDF=$(git write-tree) &&\n+\techo treeDF $treeDF &&\n+\tgit ls-tree $treeDF &&\n+\n+\trm -f DF &&\n+\tmkdir DF &&\n+\techo DF/DF >DF/DF &&\n+\tgit update-index --add --remove DF DF/DF &&\n+\ttreeDFDF=$(git write-tree) &&\n+\techo treeDFDF $treeDFDF &&\n+\tgit ls-tree $treeDFDF &&\n+\tgit ls-files --stage >DFDF.out\n+'\n+\n+test_expect_success 'DF vs DF/DF case test.' '\n+\trm -f .git/index &&\n+\trm -fr DF &&\n+\techo DF >DF &&\n+\tgit update-index --add DF &&\n+\tread_tree_u_must_succeed -m -u $treeDF $treeDFDF &&\n+\tgit ls-files --stage >DFDFcheck.out &&\n+\ttest_cmp DFDF.out DFDFcheck.out &&\n+\tcheck_cache_at DF/DF clean\n+'\n \n test_done\n-- \ngitgitgadget\n\n"},{"id":"477550","messageId":"456c73c880182e61af3c6dd5e42796e65d413996.1684440205.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 09/20] t3903-stash: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:14Z","receivedAt":"2023-05-18T20:03:57Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t3903-stash.sh | 26 +++++++++++++-------------\n 1 file changed, 13 insertions(+), 13 deletions(-)\n\ndiff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\nindex 376cc8f4ab8..0b3dfeaea20 100755\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -1211,19 +1211,19 @@ test_expect_success 'stash with file including $IFS character' '\n '\n \n test_expect_success 'stash with pathspec matching multiple paths' '\n-       echo original >file &&\n-       echo original >other-file &&\n-       git commit -m \"two\" file other-file &&\n-       echo modified >file &&\n-       echo modified >other-file &&\n-       git stash push -- \"*file\" &&\n-       echo original >expect &&\n-       test_cmp expect file &&\n-       test_cmp expect other-file &&\n-       git stash pop &&\n-       echo modified >expect &&\n-       test_cmp expect file &&\n-       test_cmp expect other-file\n+\techo original >file &&\n+\techo original >other-file &&\n+\tgit commit -m \"two\" file other-file &&\n+\techo modified >file &&\n+\techo modified >other-file &&\n+\tgit stash push -- \"*file\" &&\n+\techo original >expect &&\n+\ttest_cmp expect file &&\n+\ttest_cmp expect other-file &&\n+\tgit stash pop &&\n+\techo modified >expect &&\n+\ttest_cmp expect file &&\n+\ttest_cmp expect other-file\n '\n \n test_expect_success 'stash push -p with pathspec shows no changes only once' '\n-- \ngitgitgadget\n\n"},{"id":"477551","messageId":"f22cfe2d85067926543f86d21caa47a5626ec709.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 10/20] t4002-diff-basic: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:15Z","receivedAt":"2023-05-18T20:03:59Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t4002-diff-basic.sh | 243 +++++++++++++++++++++---------------------\n 1 file changed, 121 insertions(+), 122 deletions(-)\n\ndiff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh\nindex ea52e5b91b7..d524d4057dc 100755\n--- a/t/t4002-diff-basic.sh\n+++ b/t/t4002-diff-basic.sh\n@@ -284,132 +284,131 @@ cmp_diff_files_output () {\n     test_cmp \"$1\" .test-tmp\n }\n \n-test_expect_success \\\n-    'diff-tree of known trees.' \\\n-    'git diff-tree $tree_O $tree_A >.test-a &&\n-     cmp -s .test-a .test-plain-OA'\n-\n-test_expect_success \\\n-    'diff-tree of known trees.' \\\n-    'git diff-tree -r $tree_O $tree_A >.test-a &&\n-     cmp -s .test-a .test-recursive-OA'\n-\n-test_expect_success \\\n-    'diff-tree of known trees.' \\\n-    'git diff-tree $tree_O $tree_B >.test-a &&\n-     cmp -s .test-a .test-plain-OB'\n-\n-test_expect_success \\\n-    'diff-tree of known trees.' \\\n-    'git diff-tree -r $tree_O $tree_B >.test-a &&\n-     cmp -s .test-a .test-recursive-OB'\n-\n-test_expect_success \\\n-    'diff-tree of known trees.' \\\n-    'git diff-tree $tree_A $tree_B >.test-a &&\n-     cmp -s .test-a .test-plain-AB'\n-\n-test_expect_success \\\n-    'diff-tree of known trees.' \\\n-    'git diff-tree -r $tree_A $tree_B >.test-a &&\n-     cmp -s .test-a .test-recursive-AB'\n-\n-test_expect_success \\\n-    'diff-tree --stdin of known trees.' \\\n-    'echo $tree_A $tree_B | git diff-tree --stdin > .test-a &&\n-     echo $tree_A $tree_B > .test-plain-ABx &&\n-     cat .test-plain-AB >> .test-plain-ABx &&\n-     cmp -s .test-a .test-plain-ABx'\n-\n-test_expect_success \\\n-    'diff-tree --stdin of known trees.' \\\n-    'echo $tree_A $tree_B | git diff-tree -r --stdin > .test-a &&\n-     echo $tree_A $tree_B > .test-recursive-ABx &&\n-     cat .test-recursive-AB >> .test-recursive-ABx &&\n-     cmp -s .test-a .test-recursive-ABx'\n-\n-test_expect_success \\\n-    'diff-cache O with A in cache' \\\n-    'git read-tree $tree_A &&\n-     git diff-index --cached $tree_O >.test-a &&\n-     cmp -s .test-a .test-recursive-OA'\n-\n-test_expect_success \\\n-    'diff-cache O with B in cache' \\\n-    'git read-tree $tree_B &&\n-     git diff-index --cached $tree_O >.test-a &&\n-     cmp -s .test-a .test-recursive-OB'\n-\n-test_expect_success \\\n-    'diff-cache A with B in cache' \\\n-    'git read-tree $tree_B &&\n-     git diff-index --cached $tree_A >.test-a &&\n-     cmp -s .test-a .test-recursive-AB'\n-\n-test_expect_success \\\n-    'diff-files with O in cache and A checked out' \\\n-    'rm -fr Z [A-Z][A-Z] &&\n-     git read-tree $tree_A &&\n-     git checkout-index -f -a &&\n-     git read-tree --reset $tree_O &&\n-     test_must_fail git update-index --refresh -q &&\n-     git diff-files >.test-a &&\n-     cmp_diff_files_output .test-a .test-recursive-OA'\n-\n-test_expect_success \\\n-    'diff-files with O in cache and B checked out' \\\n-    'rm -fr Z [A-Z][A-Z] &&\n-     git read-tree $tree_B &&\n-     git checkout-index -f -a &&\n-     git read-tree --reset $tree_O &&\n-     test_must_fail git update-index --refresh -q &&\n-     git diff-files >.test-a &&\n-     cmp_diff_files_output .test-a .test-recursive-OB'\n-\n-test_expect_success \\\n-    'diff-files with A in cache and B checked out' \\\n-    'rm -fr Z [A-Z][A-Z] &&\n-     git read-tree $tree_B &&\n-     git checkout-index -f -a &&\n-     git read-tree --reset $tree_A &&\n-     test_must_fail git update-index --refresh -q &&\n-     git diff-files >.test-a &&\n-     cmp_diff_files_output .test-a .test-recursive-AB'\n+test_expect_success 'diff-tree of known trees.' '\n+\tgit diff-tree $tree_O $tree_A >.test-a &&\n+\tcmp -s .test-a .test-plain-OA\n+'\n+\n+test_expect_success 'diff-tree of known trees.' '\n+\tgit diff-tree -r $tree_O $tree_A >.test-a &&\n+\tcmp -s .test-a .test-recursive-OA\n+'\n+\n+test_expect_success 'diff-tree of known trees.' '\n+\tgit diff-tree $tree_O $tree_B >.test-a &&\n+\tcmp -s .test-a .test-plain-OB\n+'\n+\n+test_expect_success 'diff-tree of known trees.' '\n+\tgit diff-tree -r $tree_O $tree_B >.test-a &&\n+\tcmp -s .test-a .test-recursive-OB\n+'\n+\n+test_expect_success 'diff-tree of known trees.' '\n+\tgit diff-tree $tree_A $tree_B >.test-a &&\n+\tcmp -s .test-a .test-plain-AB\n+'\n+\n+test_expect_success 'diff-tree of known trees.' '\n+\tgit diff-tree -r $tree_A $tree_B >.test-a &&\n+\tcmp -s .test-a .test-recursive-AB\n+'\n+\n+test_expect_success 'diff-tree --stdin of known trees.' '\n+\techo $tree_A $tree_B | git diff-tree --stdin > .test-a &&\n+\techo $tree_A $tree_B > .test-plain-ABx &&\n+\tcat .test-plain-AB >> .test-plain-ABx &&\n+\tcmp -s .test-a .test-plain-ABx\n+'\n+\n+test_expect_success 'diff-tree --stdin of known trees.' '\n+\techo $tree_A $tree_B | git diff-tree -r --stdin > .test-a &&\n+\techo $tree_A $tree_B > .test-recursive-ABx &&\n+\tcat .test-recursive-AB >> .test-recursive-ABx &&\n+\tcmp -s .test-a .test-recursive-ABx\n+'\n+\n+test_expect_success 'diff-cache O with A in cache' '\n+\tgit read-tree $tree_A &&\n+\tgit diff-index --cached $tree_O >.test-a &&\n+\tcmp -s .test-a .test-recursive-OA\n+'\n+\n+test_expect_success 'diff-cache O with B in cache' '\n+\tgit read-tree $tree_B &&\n+\tgit diff-index --cached $tree_O >.test-a &&\n+\tcmp -s .test-a .test-recursive-OB\n+'\n+\n+test_expect_success 'diff-cache A with B in cache' '\n+\tgit read-tree $tree_B &&\n+\tgit diff-index --cached $tree_A >.test-a &&\n+\tcmp -s .test-a .test-recursive-AB\n+'\n+\n+test_expect_success 'diff-files with O in cache and A checked out' '\n+\trm -fr Z [A-Z][A-Z] &&\n+\tgit read-tree $tree_A &&\n+\tgit checkout-index -f -a &&\n+\tgit read-tree --reset $tree_O &&\n+\ttest_must_fail git update-index --refresh -q &&\n+\tgit diff-files >.test-a &&\n+\tcmp_diff_files_output .test-a .test-recursive-OA\n+'\n+\n+test_expect_success 'diff-files with O in cache and B checked out' '\n+\trm -fr Z [A-Z][A-Z] &&\n+\tgit read-tree $tree_B &&\n+\tgit checkout-index -f -a &&\n+\tgit read-tree --reset $tree_O &&\n+\ttest_must_fail git update-index --refresh -q &&\n+\tgit diff-files >.test-a &&\n+\tcmp_diff_files_output .test-a .test-recursive-OB\n+'\n+\n+test_expect_success 'diff-files with A in cache and B checked out' '\n+\trm -fr Z [A-Z][A-Z] &&\n+\tgit read-tree $tree_B &&\n+\tgit checkout-index -f -a &&\n+\tgit read-tree --reset $tree_A &&\n+\ttest_must_fail git update-index --refresh -q &&\n+\tgit diff-files >.test-a &&\n+\tcmp_diff_files_output .test-a .test-recursive-AB\n+'\n \n ################################################################\n # Now we have established the baseline, we do not have to\n # rely on individual object ID values that much.\n \n-test_expect_success \\\n-    'diff-tree O A == diff-tree -R A O' \\\n-    'git diff-tree $tree_O $tree_A >.test-a &&\n-    git diff-tree -R $tree_A $tree_O >.test-b &&\n-    cmp -s .test-a .test-b'\n-\n-test_expect_success \\\n-    'diff-tree -r O A == diff-tree -r -R A O' \\\n-    'git diff-tree -r $tree_O $tree_A >.test-a &&\n-    git diff-tree -r -R $tree_A $tree_O >.test-b &&\n-    cmp -s .test-a .test-b'\n-\n-test_expect_success \\\n-    'diff-tree B A == diff-tree -R A B' \\\n-    'git diff-tree $tree_B $tree_A >.test-a &&\n-    git diff-tree -R $tree_A $tree_B >.test-b &&\n-    cmp -s .test-a .test-b'\n-\n-test_expect_success \\\n-    'diff-tree -r B A == diff-tree -r -R A B' \\\n-    'git diff-tree -r $tree_B $tree_A >.test-a &&\n-    git diff-tree -r -R $tree_A $tree_B >.test-b &&\n-    cmp -s .test-a .test-b'\n-\n-test_expect_success \\\n-    'diff can read from stdin' \\\n-    'test_must_fail git diff --no-index -- MN - < NN |\n-        grep -v \"^index\" | sed \"s#/-#/NN#\" >.test-a &&\n-    test_must_fail git diff --no-index -- MN NN |\n-        grep -v \"^index\" >.test-b &&\n-    test_cmp .test-a .test-b'\n+test_expect_success 'diff-tree O A == diff-tree -R A O' '\n+\tgit diff-tree $tree_O $tree_A >.test-a &&\n+\tgit diff-tree -R $tree_A $tree_O >.test-b &&\n+\tcmp -s .test-a .test-b\n+'\n+\n+test_expect_success 'diff-tree -r O A == diff-tree -r -R A O' '\n+\tgit diff-tree -r $tree_O $tree_A >.test-a &&\n+\tgit diff-tree -r -R $tree_A $tree_O >.test-b &&\n+\tcmp -s .test-a .test-b\n+'\n+\n+test_expect_success 'diff-tree B A == diff-tree -R A B' '\n+\tgit diff-tree $tree_B $tree_A >.test-a &&\n+\tgit diff-tree -R $tree_A $tree_B >.test-b &&\n+\tcmp -s .test-a .test-b\n+'\n+\n+test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' '\n+\tgit diff-tree -r $tree_B $tree_A >.test-a &&\n+\tgit diff-tree -r -R $tree_A $tree_B >.test-b &&\n+\tcmp -s .test-a .test-b'\n+\n+test_expect_success'diff can read from stdin' '\n+\ttest_must_fail git diff --no-index -- MN - < NN |\n+\t\tgrep -v \"^index\" | sed \"s#/-#/NN#\" >.test-a &&\n+\ttest_must_fail git diff --no-index -- MN NN |\n+\t\tgrep -v \"^index\" >.test-b &&\n+\ttest_cmp .test-a .test-b\n+'\n \n test_done\n-- \ngitgitgadget\n\n"},{"id":"477552","messageId":"bb9abb10c6ed11a6ab528e09fca67cf1b0e29a18.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 11/20] t4003-diff-rename-1: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:16Z","receivedAt":"2023-05-18T20:04:00Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t4003-diff-rename-1.sh | 62 ++++++++++++++++++++--------------------\n 1 file changed, 31 insertions(+), 31 deletions(-)\n\ndiff --git a/t/t4003-diff-rename-1.sh b/t/t4003-diff-rename-1.sh\nindex 181e9683a79..ebe091828c8 100755\n--- a/t/t4003-diff-rename-1.sh\n+++ b/t/t4003-diff-rename-1.sh\n@@ -11,20 +11,20 @@ TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-diff.sh ;# test-lib chdir's into trash\n \n-test_expect_success \\\n-    'prepare reference tree' \\\n-    'COPYING_test_data >COPYING &&\n-     echo frotz >rezrov &&\n-    git update-index --add COPYING rezrov &&\n-    tree=$(git write-tree) &&\n-    echo $tree'\n-\n-test_expect_success \\\n-    'prepare work tree' \\\n-    'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&\n-    sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&\n-    rm -f COPYING &&\n-    git update-index --add --remove COPYING COPYING.?'\n+test_expect_success 'prepare reference tree' '\n+\tCOPYING_test_data >COPYING &&\n+\techo frotz >rezrov &&\n+\tgit update-index --add COPYING rezrov &&\n+\ttree=$(git write-tree) &&\n+\techo $tree\n+'\n+\n+test_expect_success 'prepare work tree' '\n+\tsed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&\n+\tsed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&\n+\trm -f COPYING &&\n+\tgit update-index --add --remove COPYING COPYING.?\n+'\n \n # tree has COPYING and rezrov.  work tree has COPYING.1 and COPYING.2,\n # both are slightly edited, and unchanged rezrov.  So we say you\n@@ -57,14 +57,14 @@ rename to COPYING.2\n +\tThis file is licensed under the G.P.L v2, or a later version\n EOF\n \n-test_expect_success \\\n-    'validate output from rename/copy detection (#1)' \\\n-    'compare_diff_patch current expected'\n+test_expect_success 'validate output from rename/copy detection (#1)' '\n+\tcompare_diff_patch current expected\n+'\n \n-test_expect_success \\\n-    'prepare work tree again' \\\n-    'mv COPYING.2 COPYING &&\n-     git update-index --add --remove COPYING COPYING.1 COPYING.2'\n+test_expect_success 'prepare work tree again' '\n+\tmv COPYING.2 COPYING &&\n+\tgit update-index --add --remove COPYING COPYING.1 COPYING.2\n+'\n \n # tree has COPYING and rezrov.  work tree has COPYING and COPYING.1,\n # both are slightly edited, and unchanged rezrov.  So we say you\n@@ -95,14 +95,14 @@ copy to COPYING.1\n + However, in order to allow a migration to GPLv3 if that seems like\n EOF\n \n-test_expect_success \\\n-    'validate output from rename/copy detection (#2)' \\\n-    'compare_diff_patch current expected'\n+test_expect_success 'validate output from rename/copy detection (#2)' '\n+\tcompare_diff_patch current expected\n+'\n \n-test_expect_success \\\n-    'prepare work tree once again' \\\n-    'COPYING_test_data >COPYING &&\n-     git update-index --add --remove COPYING COPYING.1'\n+test_expect_success 'prepare work tree once again' '\n+\tCOPYING_test_data >COPYING &&\n+\tgit update-index --add --remove COPYING COPYING.1\n+'\n \n # tree has COPYING and rezrov.  work tree has COPYING and COPYING.1,\n # but COPYING is not edited.  We say you copy-and-edit COPYING.1; this\n@@ -123,8 +123,8 @@ copy to COPYING.1\n + However, in order to allow a migration to GPLv3 if that seems like\n EOF\n \n-test_expect_success \\\n-    'validate output from rename/copy detection (#3)' \\\n-    'compare_diff_patch current expected'\n+test_expect_success 'validate output from rename/copy detection (#3)' '\n+\tcompare_diff_patch current expected\n+'\n \n test_done\n-- \ngitgitgadget\n\n"},{"id":"477553","messageId":"5ed43aca06f9617c0dd7425b14d0e8c470c2c72d.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 12/20] t4004-diff-rename-symlink: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:17Z","receivedAt":"2023-05-18T20:04:05Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t4004-diff-rename-symlink.sh | 42 +++++++++++++++++-----------------\n 1 file changed, 21 insertions(+), 21 deletions(-)\n\ndiff --git a/t/t4004-diff-rename-symlink.sh b/t/t4004-diff-rename-symlink.sh\nindex 8def4d4aee9..1d70d4d221b 100755\n--- a/t/t4004-diff-rename-symlink.sh\n+++ b/t/t4004-diff-rename-symlink.sh\n@@ -14,21 +14,21 @@ TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-diff.sh\n \n-test_expect_success SYMLINKS \\\n-    'prepare reference tree' \\\n-    'echo xyzzy | tr -d '\\\\\\\\'012 >yomin &&\n-     ln -s xyzzy frotz &&\n-    git update-index --add frotz yomin &&\n-    tree=$(git write-tree) &&\n-    echo $tree'\n+test_expect_success SYMLINKS 'prepare reference tree' '\n+\techo xyzzy | tr -d '\\\\\\\\'012 >yomin &&\n+\tln -s xyzzy frotz &&\n+\tgit update-index --add frotz yomin &&\n+\ttree=$(git write-tree) &&\n+\techo $tree\n+'\n \n-test_expect_success SYMLINKS \\\n-    'prepare work tree' \\\n-    'mv frotz rezrov &&\n-     rm -f yomin &&\n-     ln -s xyzzy nitfol &&\n-     ln -s xzzzy bozbar &&\n-    git update-index --add --remove frotz rezrov nitfol bozbar yomin'\n+test_expect_success SYMLINKS 'prepare work tree' '\n+\tmv frotz rezrov &&\n+\trm -f yomin &&\n+\tln -s xyzzy nitfol &&\n+\tln -s xzzzy bozbar &&\n+\tgit update-index --add --remove frotz rezrov nitfol bozbar yomin\n+'\n \n # tree has frotz pointing at xyzzy, and yomin that contains xyzzy to\n # confuse things.  work tree has rezrov (xyzzy) nitfol (xyzzy) and\n@@ -36,9 +36,9 @@ test_expect_success SYMLINKS \\\n # rezrov and nitfol are rename/copy of frotz and bozbar should be\n # a new creation.\n \n-test_expect_success SYMLINKS 'setup diff output' \"\n-    GIT_DIFF_OPTS=--unified=0 git diff-index -C -p $tree >current &&\n-    cat >expected <<\\EOF\n+test_expect_success SYMLINKS 'setup diff output' '\n+\tGIT_DIFF_OPTS=--unified=0 git diff-index -C -p $tree >current &&\n+\tcat >expected <<\\EOF\n diff --git a/bozbar b/bozbar\n new file mode 120000\n --- /dev/null\n@@ -62,10 +62,10 @@ deleted file mode 100644\n -xyzzy\n \\ No newline at end of file\n EOF\n-\"\n+'\n \n-test_expect_success SYMLINKS \\\n-    'validate diff output' \\\n-    'compare_diff_patch current expected'\n+test_expect_success SYMLINKS 'validate diff output' '\n+\tcompare_diff_patch current expected\n+'\n \n test_done\n-- \ngitgitgadget\n\n"},{"id":"477554","messageId":"7c2903d1fe913ec3cc38cda7ec18bcc225751dc3.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 13/20] t4202-log: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:18Z","receivedAt":"2023-05-18T20:04:12Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t4202-log.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex ae73aef922f..f5c0f06a56b 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -2343,10 +2343,10 @@ test_expect_success 'log --decorate does not include things outside filter' '\n '\n \n test_expect_success 'log --end-of-options' '\n-       git update-ref refs/heads/--source HEAD &&\n-       git log --end-of-options --source >actual &&\n-       git log >expect &&\n-       test_cmp expect actual\n+\tgit update-ref refs/heads/--source HEAD &&\n+\tgit log --end-of-options --source >actual &&\n+\tgit log >expect &&\n+\ttest_cmp expect actual\n '\n \n test_expect_success 'set up commits with different authors' '\n-- \ngitgitgadget\n\n"},{"id":"477555","messageId":"75a6b73d1bb196be2e4f3800c458e730b6f71237.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 14/20] t4206-log-follow-harder-copies: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:19Z","receivedAt":"2023-05-18T20:04:13Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t4206-log-follow-harder-copies.sh | 36 ++++++++++++++---------------\n 1 file changed, 18 insertions(+), 18 deletions(-)\n\ndiff --git a/t/t4206-log-follow-harder-copies.sh b/t/t4206-log-follow-harder-copies.sh\nindex 33ecf82c7f9..9167b0351f2 100755\n--- a/t/t4206-log-follow-harder-copies.sh\n+++ b/t/t4206-log-follow-harder-copies.sh\n@@ -16,29 +16,29 @@ Line 2\n Line 3\n '\n \n-test_expect_success \\\n-    'add a file path0 and commit.' \\\n-    'git add path0 &&\n-     git commit -m \"Add path0\"'\n+test_expect_success 'add a file path0 and commit.' '\n+\tgit add path0 &&\n+\tgit commit -m \"Add path0\"\n+'\n \n echo >path0 'New line 1\n New line 2\n New line 3\n '\n-test_expect_success \\\n-    'Change path0.' \\\n-    'git add path0 &&\n-     git commit -m \"Change path0\"'\n+test_expect_success 'Change path0.' '\n+\tgit add path0 &&\n+\tgit commit -m \"Change path0\"\n+'\n \n cat <path0 >path1\n-test_expect_success \\\n-    'copy path0 to path1.' \\\n-    'git add path1 &&\n-     git commit -m \"Copy path1 from path0\"'\n+test_expect_success 'copy path0 to path1.' '\n+\tgit add path1 &&\n+\tgit commit -m \"Copy path1 from path0\"\n+'\n \n-test_expect_success \\\n-    'find the copy path0 -> path1 harder' \\\n-    'git log --follow --name-status --pretty=\"format:%s\"  path1 > current'\n+test_expect_success 'find the copy path0 -> path1 harder' '\n+\tgit log --follow --name-status --pretty=\"format:%s\"  path1 > current\n+'\n \n cat >expected <<\\EOF\n Copy path1 from path0\n@@ -51,8 +51,8 @@ Add path0\n A\tpath0\n EOF\n \n-test_expect_success \\\n-    'validate the output.' \\\n-    'compare_diff_patch current expected'\n+test_expect_success 'validate the output.' '\n+\tcompare_diff_patch current expected\n+'\n \n test_done\n-- \ngitgitgadget\n\n"},{"id":"477556","messageId":"7b348f3481f52bab876eb22485d3ec21c3f927f4.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 15/20] t5300-pack-object: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:20Z","receivedAt":"2023-05-18T20:04:18Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t5300-pack-object.sh | 184 ++++++++++++++++++++---------------------\n 1 file changed, 92 insertions(+), 92 deletions(-)\n\ndiff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh\nindex d2ce236d612..745089479ca 100755\n--- a/t/t5300-pack-object.sh\n+++ b/t/t5300-pack-object.sh\n@@ -208,7 +208,7 @@ test_expect_success 'unpack with OFS_DELTA' '\n '\n \n test_expect_success 'unpack with OFS_DELTA (core.fsyncmethod=batch)' '\n-       check_unpack test-3-${packname_3} obj-list \"$BATCH_CONFIGURATION\"\n+\tcheck_unpack test-3-${packname_3} obj-list \"$BATCH_CONFIGURATION\"\n '\n \n test_expect_success 'compare delta flavors' '\n@@ -263,97 +263,97 @@ test_expect_success 'survive missing objects/pack directory' '\n \t)\n '\n \n-test_expect_success \\\n-    'verify pack' \\\n-    'git verify-pack\ttest-1-${packname_1}.idx \\\n-\t\t\ttest-2-${packname_2}.idx \\\n-\t\t\ttest-3-${packname_3}.idx'\n-\n-test_expect_success \\\n-    'verify pack -v' \\\n-    'git verify-pack -v\ttest-1-${packname_1}.idx \\\n-\t\t\ttest-2-${packname_2}.idx \\\n-\t\t\ttest-3-${packname_3}.idx'\n-\n-test_expect_success \\\n-    'verify-pack catches mismatched .idx and .pack files' \\\n-    'cat test-1-${packname_1}.idx >test-3.idx &&\n-     cat test-2-${packname_2}.pack >test-3.pack &&\n-     if git verify-pack test-3.idx\n-     then false\n-     else :;\n-     fi'\n-\n-test_expect_success \\\n-    'verify-pack catches a corrupted pack signature' \\\n-    'cat test-1-${packname_1}.pack >test-3.pack &&\n-     echo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=2 &&\n-     if git verify-pack test-3.idx\n-     then false\n-     else :;\n-     fi'\n-\n-test_expect_success \\\n-    'verify-pack catches a corrupted pack version' \\\n-    'cat test-1-${packname_1}.pack >test-3.pack &&\n-     echo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=7 &&\n-     if git verify-pack test-3.idx\n-     then false\n-     else :;\n-     fi'\n-\n-test_expect_success \\\n-    'verify-pack catches a corrupted type/size of the 1st packed object data' \\\n-    'cat test-1-${packname_1}.pack >test-3.pack &&\n-     echo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=12 &&\n-     if git verify-pack test-3.idx\n-     then false\n-     else :;\n-     fi'\n-\n-test_expect_success \\\n-    'verify-pack catches a corrupted sum of the index file itself' \\\n-    'l=$(wc -c <test-3.idx) &&\n-     l=$(expr $l - 20) &&\n-     cat test-1-${packname_1}.pack >test-3.pack &&\n-     printf \"%20s\" \"\" | dd of=test-3.idx count=20 bs=1 conv=notrunc seek=$l &&\n-     if git verify-pack test-3.pack\n-     then false\n-     else :;\n-     fi'\n-\n-test_expect_success \\\n-    'build pack index for an existing pack' \\\n-    'cat test-1-${packname_1}.pack >test-3.pack &&\n-     git index-pack -o tmp.idx test-3.pack &&\n-     cmp tmp.idx test-1-${packname_1}.idx &&\n-\n-     git index-pack --promisor=message test-3.pack &&\n-     cmp test-3.idx test-1-${packname_1}.idx &&\n-     echo message >expect &&\n-     test_cmp expect test-3.promisor &&\n-\n-     cat test-2-${packname_2}.pack >test-3.pack &&\n-     git index-pack -o tmp.idx test-2-${packname_2}.pack &&\n-     cmp tmp.idx test-2-${packname_2}.idx &&\n-\n-     git index-pack test-3.pack &&\n-     cmp test-3.idx test-2-${packname_2}.idx &&\n-\n-     cat test-3-${packname_3}.pack >test-3.pack &&\n-     git index-pack -o tmp.idx test-3-${packname_3}.pack &&\n-     cmp tmp.idx test-3-${packname_3}.idx &&\n-\n-     git index-pack test-3.pack &&\n-     cmp test-3.idx test-3-${packname_3}.idx &&\n-\n-     cat test-1-${packname_1}.pack >test-4.pack &&\n-     rm -f test-4.keep &&\n-     git index-pack --keep=why test-4.pack &&\n-     cmp test-1-${packname_1}.idx test-4.idx &&\n-     test -f test-4.keep &&\n-\n-     :'\n+test_expect_success 'verify pack' '\n+\tgit verify-pack test-1-${packname_1}.idx \\\n+\t\ttest-2-${packname_2}.idx \\\n+\t\ttest-3-${packname_3}.idx\n+'\n+\n+test_expect_success 'verify pack -v' '\n+\tgit verify-pack -v test-1-${packname_1}.idx \\\n+\t\ttest-2-${packname_2}.idx \\\n+\t\ttest-3-${packname_3}.idx\n+'\n+\n+test_expect_success 'verify-pack catches mismatched .idx and .pack files' '\n+\tcat test-1-${packname_1}.idx >test-3.idx &&\n+\tcat test-2-${packname_2}.pack >test-3.pack &&\n+\tif git verify-pack test-3.idx\n+\tthen false\n+\telse :;\n+\tfi\n+'\n+\n+test_expect_success 'verify-pack catches a corrupted pack signature' '\n+\tcat test-1-${packname_1}.pack >test-3.pack &&\n+\techo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=2 &&\n+\tif git verify-pack test-3.idx\n+\tthen false\n+\telse :;\n+\tfi\n+'\n+\n+test_expect_success 'verify-pack catches a corrupted pack version' '\n+\tcat test-1-${packname_1}.pack >test-3.pack &&\n+\techo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=7 &&\n+\tif git verify-pack test-3.idx\n+\tthen false\n+\telse :;\n+\tfi\n+'\n+\n+test_expect_success 'verify-pack catches a corrupted type/size of the 1st packed object data' '\n+\tcat test-1-${packname_1}.pack >test-3.pack &&\n+\techo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=12 &&\n+\tif git verify-pack test-3.idx\n+\tthen false\n+\telse :;\n+\tfi\n+'\n+\n+test_expect_success 'verify-pack catches a corrupted sum of the index file itself' '\n+\tl=$(wc -c <test-3.idx) &&\n+\tl=$(expr $l - 20) &&\n+\tcat test-1-${packname_1}.pack >test-3.pack &&\n+\tprintf \"%20s\" \"\" | dd of=test-3.idx count=20 bs=1 conv=notrunc seek=$l &&\n+\tif git verify-pack test-3.pack\n+\tthen false\n+\telse :;\n+\tfi\n+'\n+\n+test_expect_success 'build pack index for an existing pack' '\n+\tcat test-1-${packname_1}.pack >test-3.pack &&\n+\tgit index-pack -o tmp.idx test-3.pack &&\n+\tcmp tmp.idx test-1-${packname_1}.idx &&\n+\n+\tgit index-pack --promisor=message test-3.pack &&\n+\tcmp test-3.idx test-1-${packname_1}.idx &&\n+\techo message >expect &&\n+\ttest_cmp expect test-3.promisor &&\n+\n+\tcat test-2-${packname_2}.pack >test-3.pack &&\n+\tgit index-pack -o tmp.idx test-2-${packname_2}.pack &&\n+\tcmp tmp.idx test-2-${packname_2}.idx &&\n+\n+\tgit index-pack test-3.pack &&\n+\tcmp test-3.idx test-2-${packname_2}.idx &&\n+\n+\tcat test-3-${packname_3}.pack >test-3.pack &&\n+\tgit index-pack -o tmp.idx test-3-${packname_3}.pack &&\n+\tcmp tmp.idx test-3-${packname_3}.idx &&\n+\n+\tgit index-pack test-3.pack &&\n+\tcmp test-3.idx test-3-${packname_3}.idx &&\n+\n+\tcat test-1-${packname_1}.pack >test-4.pack &&\n+\trm -f test-4.keep &&\n+\tgit index-pack --keep=why test-4.pack &&\n+\tcmp test-1-${packname_1}.idx test-4.idx &&\n+\ttest -f test-4.keep &&\n+\n+\t:\n+'\n \n test_expect_success 'unpacking with --strict' '\n \n-- \ngitgitgadget\n\n"},{"id":"477557","messageId":"6325c8f48c4fd36cc509d4a20e5eb4d6377547b0.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 16/20] t5301-sliding-window: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:21Z","receivedAt":"2023-05-18T20:04:21Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t5301-sliding-window.sh | 100 +++++++++++++++++++-------------------\n 1 file changed, 50 insertions(+), 50 deletions(-)\n\ndiff --git a/t/t5301-sliding-window.sh b/t/t5301-sliding-window.sh\nindex 3ccaaeb3977..226490d60df 100755\n--- a/t/t5301-sliding-window.sh\n+++ b/t/t5301-sliding-window.sh\n@@ -8,55 +8,55 @@ test_description='mmap sliding window tests'\n TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n-test_expect_success \\\n-    'setup' \\\n-    'rm -f .git/index* &&\n-     for i in a b c\n-     do\n-         echo $i >$i &&\n-\t test-tool genrandom \"$i\" 32768 >>$i &&\n-         git update-index --add $i || return 1\n-     done &&\n-     echo d >d && cat c >>d && git update-index --add d &&\n-     tree=$(git write-tree) &&\n-     commit1=$(git commit-tree $tree </dev/null) &&\n-     git update-ref HEAD $commit1 &&\n-     git repack -a -d &&\n-     test \"$(git count-objects)\" = \"0 objects, 0 kilobytes\" &&\n-     pack1=$(ls .git/objects/pack/*.pack) &&\n-     test -f \"$pack1\"'\n-\n-test_expect_success \\\n-    'verify-pack -v, defaults' \\\n-    'git verify-pack -v \"$pack1\"'\n-\n-test_expect_success \\\n-    'verify-pack -v, packedGitWindowSize == 1 page' \\\n-    'git config core.packedGitWindowSize 512 &&\n-     git verify-pack -v \"$pack1\"'\n-\n-test_expect_success \\\n-    'verify-pack -v, packedGit{WindowSize,Limit} == 1 page' \\\n-    'git config core.packedGitWindowSize 512 &&\n-     git config core.packedGitLimit 512 &&\n-     git verify-pack -v \"$pack1\"'\n-\n-test_expect_success \\\n-    'repack -a -d, packedGit{WindowSize,Limit} == 1 page' \\\n-    'git config core.packedGitWindowSize 512 &&\n-     git config core.packedGitLimit 512 &&\n-     commit2=$(git commit-tree $tree -p $commit1 </dev/null) &&\n-     git update-ref HEAD $commit2 &&\n-     git repack -a -d &&\n-     test \"$(git count-objects)\" = \"0 objects, 0 kilobytes\" &&\n-     pack2=$(ls .git/objects/pack/*.pack) &&\n-     test -f \"$pack2\" &&\n-     test \"$pack1\" \\!= \"$pack2\"'\n-\n-test_expect_success \\\n-    'verify-pack -v, defaults' \\\n-    'git config --unset core.packedGitWindowSize &&\n-     git config --unset core.packedGitLimit &&\n-     git verify-pack -v \"$pack2\"'\n+test_expect_success 'setup' '\n+\trm -f .git/index* &&\n+\tfor i in a b c\n+\tdo\n+\techo $i >$i &&\n+\ttest-tool genrandom \"$i\" 32768 >>$i &&\n+\tgit update-index --add $i || return 1\n+\tdone &&\n+\techo d >d && cat c >>d && git update-index --add d &&\n+\ttree=$(git write-tree) &&\n+\tcommit1=$(git commit-tree $tree </dev/null) &&\n+\tgit update-ref HEAD $commit1 &&\n+\tgit repack -a -d &&\n+\ttest \"$(git count-objects)\" = \"0 objects, 0 kilobytes\" &&\n+\tpack1=$(ls .git/objects/pack/*.pack) &&\n+\ttest -f \"$pack1\"\n+'\n+\n+test_expect_success 'verify-pack -v, defaults' '\n+\tgit verify-pack -v \"$pack1\"\n+'\n+\n+test_expect_success 'verify-pack -v, packedGitWindowSize == 1 page' '\n+\tgit config core.packedGitWindowSize 512 &&\n+\tgit verify-pack -v \"$pack1\"\n+'\n+\n+test_expect_success 'verify-pack -v, packedGit{WindowSize,Limit} == 1 page' '\n+\tgit config core.packedGitWindowSize 512 &&\n+\tgit config core.packedGitLimit 512 &&\n+\tgit verify-pack -v \"$pack1\"\n+'\n+\n+test_expect_success 'repack -a -d, packedGit{WindowSize,Limit} == 1 page' '\n+\tgit config core.packedGitWindowSize 512 &&\n+\tgit config core.packedGitLimit 512 &&\n+\tcommit2=$(git commit-tree $tree -p $commit1 </dev/null) &&\n+\tgit update-ref HEAD $commit2 &&\n+\tgit repack -a -d &&\n+\ttest \"$(git count-objects)\" = \"0 objects, 0 kilobytes\" &&\n+\tpack2=$(ls .git/objects/pack/*.pack) &&\n+\ttest -f \"$pack2\" &&\n+\ttest \"$pack1\" \\!= \"$pack2\"\n+'\n+\n+test_expect_success 'verify-pack -v, defaults' '\n+\tgit config --unset core.packedGitWindowSize &&\n+\tgit config --unset core.packedGitLimit &&\n+\tgit verify-pack -v \"$pack2\"\n+'\n \n test_done\n-- \ngitgitgadget\n\n"},{"id":"477558","messageId":"bef72336ae83266ecdd8f61e2715a48dc21214e0.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 18/20] t5306-pack-nobase: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:23Z","receivedAt":"2023-05-18T20:04:22Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t5306-pack-nobase.sh | 94 ++++++++++++++++++++----------------------\n 1 file changed, 45 insertions(+), 49 deletions(-)\n\ndiff --git a/t/t5306-pack-nobase.sh b/t/t5306-pack-nobase.sh\nindex 846c5ca7d34..0d50c6b4bca 100755\n--- a/t/t5306-pack-nobase.sh\n+++ b/t/t5306-pack-nobase.sh\n@@ -12,18 +12,17 @@ TEST_PASSES_SANITIZE_LEAK=true\n \n # Create A-B chain\n #\n-test_expect_success \\\n-    'setup base' \\\n-    'test_write_lines a b c d e f g h i >text &&\n-     echo side >side &&\n-     git update-index --add text side &&\n-     A=$(echo A | git commit-tree $(git write-tree)) &&\n+test_expect_success 'setup base' '\n+\ttest_write_lines a b c d e f g h i >text &&\n+\techo side >side &&\n+\tgit update-index --add text side &&\n+\tA=$(echo A | git commit-tree $(git write-tree)) &&\n \n-     echo m >>text &&\n-     git update-index text &&\n-     B=$(echo B | git commit-tree $(git write-tree) -p $A) &&\n-     git update-ref HEAD $B\n-    '\n+\techo m >>text &&\n+\tgit update-index text &&\n+\tB=$(echo B | git commit-tree $(git write-tree) -p $A) &&\n+\tgit update-ref HEAD $B\n+'\n \n # Create repository with C whose parent is B.\n # Repository contains C, C^{tree}, C:text, B, B^{tree}.\n@@ -31,52 +30,49 @@ test_expect_success \\\n # Repository is missing A (parent of B).\n # Repository is missing A:side.\n #\n-test_expect_success \\\n-    'setup patch_clone' \\\n-    'base_objects=$(pwd)/.git/objects &&\n-     (mkdir patch_clone &&\n-      cd patch_clone &&\n-      git init &&\n-      echo \"$base_objects\" >.git/objects/info/alternates &&\n-      echo q >>text &&\n-      git read-tree $B &&\n-      git update-index text &&\n-      git update-ref HEAD $(echo C | git commit-tree $(git write-tree) -p $B) &&\n-      rm .git/objects/info/alternates &&\n+test_expect_success 'setup patch_clone' '\n+\tbase_objects=$(pwd)/.git/objects &&\n+\t(mkdir patch_clone &&\n+\tcd patch_clone &&\n+\tgit init &&\n+\techo \"$base_objects\" >.git/objects/info/alternates &&\n+\techo q >>text &&\n+\tgit read-tree $B &&\n+\tgit update-index text &&\n+\tgit update-ref HEAD $(echo C | git commit-tree $(git write-tree) -p $B) &&\n+\trm .git/objects/info/alternates &&\n \n-      git --git-dir=../.git cat-file commit $B |\n-      git hash-object -t commit -w --stdin &&\n+\tgit --git-dir=../.git cat-file commit $B |\n+\tgit hash-object -t commit -w --stdin &&\n \n-      git --git-dir=../.git cat-file tree \"$B^{tree}\" |\n-      git hash-object -t tree -w --stdin\n-     ) &&\n-     C=$(git --git-dir=patch_clone/.git rev-parse HEAD)\n-    '\n+\tgit --git-dir=../.git cat-file tree \"$B^{tree}\" |\n+\tgit hash-object -t tree -w --stdin\n+\t) &&\n+\tC=$(git --git-dir=patch_clone/.git rev-parse HEAD)\n+'\n \n # Clone patch_clone indirectly by cloning base and fetching.\n #\n-test_expect_success \\\n-    'indirectly clone patch_clone' \\\n-    '(mkdir user_clone &&\n-      cd user_clone &&\n-      git init &&\n-      git pull ../.git &&\n-      test $(git rev-parse HEAD) = $B &&\n+test_expect_success 'indirectly clone patch_clone' '\n+\t(mkdir user_clone &&\n+\t cd user_clone &&\n+\t git init &&\n+\t git pull ../.git &&\n+\t test $(git rev-parse HEAD) = $B &&\n \n-      git pull ../patch_clone/.git &&\n-      test $(git rev-parse HEAD) = $C\n-     )\n-    '\n+\t git pull ../patch_clone/.git &&\n+\t test $(git rev-parse HEAD) = $C\n+\t)\n+'\n \n # Cloning the patch_clone directly should fail.\n #\n-test_expect_success \\\n-    'clone of patch_clone is incomplete' \\\n-    '(mkdir user_direct &&\n-      cd user_direct &&\n-      git init &&\n-      test_must_fail git fetch ../patch_clone/.git\n-     )\n-    '\n+test_expect_success 'clone of patch_clone is incomplete' '\n+\t(mkdir user_direct &&\n+\t cd user_direct &&\n+\t git init &&\n+\t test_must_fail git fetch ../patch_clone/.git\n+\t)\n+'\n \n test_done\n-- \ngitgitgadget\n\n"},{"id":"477559","messageId":"8e5a934ae1e9b2a1fde670ba54a9c2f141f13110.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 17/20] t5303-pack-corruption-resilience: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:22Z","receivedAt":"2023-05-18T20:04:23Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t5303-pack-corruption-resilience.sh | 584 +++++++++++++-------------\n 1 file changed, 292 insertions(+), 292 deletions(-)\n\ndiff --git a/t/t5303-pack-corruption-resilience.sh b/t/t5303-pack-corruption-resilience.sh\nindex 2926e8dfc41..61469ef4a68 100755\n--- a/t/t5303-pack-corruption-resilience.sh\n+++ b/t/t5303-pack-corruption-resilience.sh\n@@ -59,304 +59,304 @@ do_corrupt_object() {\n \n printf '\\0' > zero\n \n-test_expect_success \\\n-    'initial setup validation' \\\n-    'create_test_files &&\n-     create_new_pack &&\n-     git prune-packed &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    'create corruption in header of first object' \\\n-    'do_corrupt_object $blob_1 0 < zero &&\n-     test_must_fail git cat-file blob $blob_1 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... but having a loose copy allows for full recovery' \\\n-    'mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_1 &&\n-     mv tmp ${pack}.idx &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... and loose copy of first delta allows for partial recovery' \\\n-    'git prune-packed &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_2 &&\n-     mv tmp ${pack}.idx &&\n-     test_must_fail git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    'create corruption in data of first object' \\\n-    'create_new_pack &&\n-     git prune-packed &&\n-     chmod +w ${pack}.pack &&\n-     perl -i.bak -pe \"s/ base /abcdef/\" ${pack}.pack &&\n-     test_must_fail git cat-file blob $blob_1 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... but having a loose copy allows for full recovery' \\\n-    'mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_1 &&\n-     mv tmp ${pack}.idx &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... and loose copy of second object allows for partial recovery' \\\n-    'git prune-packed &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_2 &&\n-     mv tmp ${pack}.idx &&\n-     test_must_fail git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    'create corruption in header of first delta' \\\n-    'create_new_pack &&\n-     git prune-packed &&\n-     do_corrupt_object $blob_2 0 < zero &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... but having a loose copy allows for full recovery' \\\n-    'mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_2 &&\n-     mv tmp ${pack}.idx &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... and then a repack \"clears\" the corruption' \\\n-    'do_repack &&\n-     git prune-packed &&\n-     git verify-pack ${pack}.pack &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    'create corruption in data of first delta' \\\n-    'create_new_pack &&\n-     git prune-packed &&\n-     chmod +w ${pack}.pack &&\n-     perl -i.bak -pe \"s/ delta1 /abcdefgh/\" ${pack}.pack &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... but having a loose copy allows for full recovery' \\\n-    'mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_2 &&\n-     mv tmp ${pack}.idx &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... and then a repack \"clears\" the corruption' \\\n-    'do_repack &&\n-     git prune-packed &&\n-     git verify-pack ${pack}.pack &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    'corruption in delta base reference of first delta (OBJ_REF_DELTA)' \\\n-    'create_new_pack &&\n-     git prune-packed &&\n-     do_corrupt_object $blob_2 2 < zero &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... but having a loose copy allows for full recovery' \\\n-    'mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_2 &&\n-     mv tmp ${pack}.idx &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... and then a repack \"clears\" the corruption' \\\n-    'do_repack &&\n-     git prune-packed &&\n-     git verify-pack ${pack}.pack &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    'corruption #0 in delta base reference of first delta (OBJ_OFS_DELTA)' \\\n-    'create_new_pack --delta-base-offset &&\n-     git prune-packed &&\n-     do_corrupt_object $blob_2 2 < zero &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... but having a loose copy allows for full recovery' \\\n-    'mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_2 &&\n-     mv tmp ${pack}.idx &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... and then a repack \"clears\" the corruption' \\\n-    'do_repack --delta-base-offset &&\n-     git prune-packed &&\n-     git verify-pack ${pack}.pack &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    'corruption #1 in delta base reference of first delta (OBJ_OFS_DELTA)' \\\n-    'create_new_pack --delta-base-offset &&\n-     git prune-packed &&\n-     printf \"\\001\" | do_corrupt_object $blob_2 2 &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... but having a loose copy allows for full recovery' \\\n-    'mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_2 &&\n-     mv tmp ${pack}.idx &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... and then a repack \"clears\" the corruption' \\\n-    'do_repack --delta-base-offset &&\n-     git prune-packed &&\n-     git verify-pack ${pack}.pack &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... and a redundant pack allows for full recovery too' \\\n-    'do_corrupt_object $blob_2 2 < zero &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_3 > /dev/null &&\n-     mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_1 &&\n-     git hash-object -t blob -w file_2 &&\n-     printf \"$blob_1\\n$blob_2\\n\" | git pack-objects .git/objects/pack/pack &&\n-     git prune-packed &&\n-     mv tmp ${pack}.idx &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    'corruption of delta base reference pointing to wrong object' \\\n-    'create_new_pack --delta-base-offset &&\n-     git prune-packed &&\n-     printf \"\\220\\033\" | do_corrupt_object $blob_3 2 &&\n-     git cat-file blob $blob_1 >/dev/null &&\n-     git cat-file blob $blob_2 >/dev/null &&\n-     test_must_fail git cat-file blob $blob_3 >/dev/null'\n-\n-test_expect_success \\\n-    '... but having a loose copy allows for full recovery' \\\n-    'mv ${pack}.idx tmp &&\n-     git hash-object -t blob -w file_3 &&\n-     mv tmp ${pack}.idx &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    '... and then a repack \"clears\" the corruption' \\\n-    'do_repack --delta-base-offset --no-reuse-delta &&\n-     git prune-packed &&\n-     git verify-pack ${pack}.pack &&\n-     git cat-file blob $blob_1 > /dev/null &&\n-     git cat-file blob $blob_2 > /dev/null &&\n-     git cat-file blob $blob_3 > /dev/null'\n-\n-test_expect_success \\\n-    'corrupting header to have too small output buffer fails unpack' \\\n-    'create_new_pack &&\n-     git prune-packed &&\n-     printf \"\\262\\001\" | do_corrupt_object $blob_1 0 &&\n-     test_must_fail git cat-file blob $blob_1 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_2 > /dev/null &&\n-     test_must_fail git cat-file blob $blob_3 > /dev/null'\n+test_expect_success 'initial setup validation' '\n+\tcreate_test_files &&\n+\tcreate_new_pack &&\n+\tgit prune-packed &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success 'create corruption in header of first object' '\n+\tdo_corrupt_object $blob_1 0 < zero &&\n+\ttest_must_fail git cat-file blob $blob_1 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... but having a loose copy allows for full recovery' '\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_1 &&\n+\tmv tmp ${pack}.idx &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... and loose copy of first delta allows for partial recovery' '\n+\tgit prune-packed &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_2 &&\n+\tmv tmp ${pack}.idx &&\n+\ttest_must_fail git cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success 'create corruption in data of first object' '\n+\tcreate_new_pack &&\n+\tgit prune-packed &&\n+\tchmod +w ${pack}.pack &&\n+\tperl -i.bak -pe \"s/ base /abcdef/\" ${pack}.pack &&\n+\ttest_must_fail git cat-file blob $blob_1 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... but having a loose copy allows for full recovery' '\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_1 &&\n+\tmv tmp ${pack}.idx &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... and loose copy of second object allows for partial recovery' '\n+\tgit prune-packed &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_2 &&\n+\tmv tmp ${pack}.idx &&\n+\ttest_must_fail git cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success 'create corruption in header of first delta' '\n+\tcreate_new_pack &&\n+\tgit prune-packed &&\n+\tdo_corrupt_object $blob_2 0 < zero &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... but having a loose copy allows for full recovery' '\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_2 &&\n+\tmv tmp ${pack}.idx &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... and then a repack \"clears\" the corruption' '\n+\tdo_repack &&\n+\tgit prune-packed &&\n+\tgit verify-pack ${pack}.pack &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success 'create corruption in data of first delta' '\n+\tcreate_new_pack &&\n+\tgit prune-packed &&\n+\tchmod +w ${pack}.pack &&\n+\tperl -i.bak -pe \"s/ delta1 /abcdefgh/\" ${pack}.pack &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... but having a loose copy allows for full recovery' '\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_2 &&\n+\tmv tmp ${pack}.idx &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... and then a repack \"clears\" the corruption' '\n+\tdo_repack &&\n+\tgit prune-packed &&\n+\tgit verify-pack ${pack}.pack &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success 'corruption in delta base reference of first delta (OBJ_REF_DELTA)' '\n+\tcreate_new_pack &&\n+\tgit prune-packed &&\n+\tdo_corrupt_object $blob_2 2 < zero &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... but having a loose copy allows for full recovery' '\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_2 &&\n+\tmv tmp ${pack}.idx &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... and then a repack \"clears\" the corruption' '\n+\tdo_repack &&\n+\tgit prune-packed &&\n+\tgit verify-pack ${pack}.pack &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success 'corruption #0 in delta base reference of first delta (OBJ_OFS_DELTA)' '\n+\tcreate_new_pack --delta-base-offset &&\n+\tgit prune-packed &&\n+\tdo_corrupt_object $blob_2 2 < zero &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... but having a loose copy allows for full recovery' '\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_2 &&\n+\tmv tmp ${pack}.idx &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... and then a repack \"clears\" the corruption' '\n+\tdo_repack --delta-base-offset &&\n+\tgit prune-packed &&\n+\tgit verify-pack ${pack}.pack &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success 'corruption #1 in delta base reference of first delta (OBJ_OFS_DELTA)' '\n+\tcreate_new_pack --delta-base-offset &&\n+\tgit prune-packed &&\n+\tprintf \"\\001\" | do_corrupt_object $blob_2 2 &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... but having a loose copy allows for full recovery' '\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_2 &&\n+\tmv tmp ${pack}.idx &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... and then a repack \"clears\" the corruption' '\n+\tdo_repack --delta-base-offset &&\n+\tgit prune-packed &&\n+\tgit verify-pack ${pack}.pack &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... and a redundant pack allows for full recovery too' '\n+\tdo_corrupt_object $blob_2 2 < zero &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 > /dev/null &&\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_1 &&\n+\tgit hash-object -t blob -w file_2 &&\n+\tprintf \"$blob_1\\n$blob_2\\n\" | git pack-objects .git/objects/pack/pack &&\n+\tgit prune-packed &&\n+\tmv tmp ${pack}.idx &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success 'corruption of delta base reference pointing to wrong object' '\n+\tcreate_new_pack --delta-base-offset &&\n+\tgit prune-packed &&\n+\tprintf \"\\220\\033\" | do_corrupt_object $blob_3 2 &&\n+\tgit cat-file blob $blob_1 >/dev/null &&\n+\tgit cat-file blob $blob_2 >/dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 >/dev/null\n+'\n+\n+test_expect_success '... but having a loose copy allows for full recovery' '\n+\tmv ${pack}.idx tmp &&\n+\tgit hash-object -t blob -w file_3 &&\n+\tmv tmp ${pack}.idx &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success '... and then a repack \"clears\" the corruption' '\n+\tdo_repack --delta-base-offset --no-reuse-delta &&\n+\tgit prune-packed &&\n+\tgit verify-pack ${pack}.pack &&\n+\tgit cat-file blob $blob_1 > /dev/null &&\n+\tgit cat-file blob $blob_2 > /dev/null &&\n+\tgit cat-file blob $blob_3 > /dev/null\n+'\n+\n+test_expect_success 'corrupting header to have too small output buffer fails unpack' '\n+\tcreate_new_pack &&\n+\tgit prune-packed &&\n+\tprintf \"\\262\\001\" | do_corrupt_object $blob_1 0 &&\n+\ttest_must_fail git cat-file blob $blob_1 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_2 > /dev/null &&\n+\ttest_must_fail git cat-file blob $blob_3 > /dev/null\n+'\n \n # \\0 - empty base\n # \\1 - one byte in result\n # \\1 - one literal byte (X)\n-test_expect_success \\\n-    'apply good minimal delta' \\\n-    'printf \"\\0\\1\\1X\" > minimal_delta &&\n-     test-tool delta -p /dev/null minimal_delta /dev/null'\n+test_expect_success 'apply good minimal delta' '\n+\tprintf \"\\0\\1\\1X\" > minimal_delta &&\n+\ttest-tool delta -p /dev/null minimal_delta /dev/null\n+'\n \n # \\0 - empty base\n # \\1 - 1 byte in result\n # \\2 - two literal bytes (one too many)\n-test_expect_success \\\n-    'apply delta with too many literal bytes' \\\n-    'printf \"\\0\\1\\2XX\" > too_big_literal &&\n-     test_must_fail test-tool delta -p /dev/null too_big_literal /dev/null'\n+test_expect_success 'apply delta with too many literal bytes' '\n+\tprintf \"\\0\\1\\2XX\" > too_big_literal &&\n+\ttest_must_fail test-tool delta -p /dev/null too_big_literal /dev/null\n+'\n \n # \\4 - four bytes in base\n # \\1 - one byte in result\n # \\221 - copy, one byte offset, one byte size\n #   \\0 - copy from offset 0\n #   \\2 - copy two bytes (one too many)\n-test_expect_success \\\n-    'apply delta with too many copied bytes' \\\n-    'printf \"\\4\\1\\221\\0\\2\" > too_big_copy &&\n-     printf base >base &&\n-     test_must_fail test-tool delta -p base too_big_copy /dev/null'\n+test_expect_success 'apply delta with too many copied bytes' '\n+\tprintf \"\\4\\1\\221\\0\\2\" > too_big_copy &&\n+\tprintf base >base &&\n+\ttest_must_fail test-tool delta -p base too_big_copy /dev/null\n+'\n \n # \\0 - empty base\n # \\2 - two bytes in result\n # \\2 - two literal bytes (we are short one)\n-test_expect_success \\\n-    'apply delta with too few literal bytes' \\\n-    'printf \"\\0\\2\\2X\" > truncated_delta &&\n-     test_must_fail test-tool delta -p /dev/null truncated_delta /dev/null'\n+test_expect_success 'apply delta with too few literal bytes' '\n+\tprintf \"\\0\\2\\2X\" > truncated_delta &&\n+\ttest_must_fail test-tool delta -p /dev/null truncated_delta /dev/null\n+'\n \n # \\0 - empty base\n # \\1 - one byte in result\n # \\221 - copy, one byte offset, one byte size\n #   \\0 - copy from offset 0\n #   \\1 - copy one byte (we are short one)\n-test_expect_success \\\n-    'apply delta with too few bytes in base' \\\n-    'printf \"\\0\\1\\221\\0\\1\" > truncated_base &&\n-     test_must_fail test-tool delta -p /dev/null truncated_base /dev/null'\n+test_expect_success 'apply delta with too few bytes in base' '\n+\tprintf \"\\0\\1\\221\\0\\1\" > truncated_base &&\n+\ttest_must_fail test-tool delta -p /dev/null truncated_base /dev/null\n+'\n \n # \\4 - four bytes in base\n # \\2 - two bytes in result\n@@ -366,20 +366,20 @@ test_expect_success \\\n #\n # Note that the literal byte is necessary to get past the uninteresting minimum\n # delta size check.\n-test_expect_success \\\n-    'apply delta with truncated copy parameters' \\\n-    'printf \"\\4\\2\\1X\\221\" > truncated_copy_delta &&\n-     printf base >base &&\n-     test_must_fail test-tool delta -p base truncated_copy_delta /dev/null'\n+test_expect_success 'apply delta with truncated copy parameters' '\n+\tprintf \"\\4\\2\\1X\\221\" > truncated_copy_delta &&\n+\tprintf base >base &&\n+\ttest_must_fail test-tool delta -p base truncated_copy_delta /dev/null\n+'\n \n # \\0 - empty base\n # \\1 - one byte in result\n # \\1 - one literal byte (X)\n # \\1 - trailing garbage command\n-test_expect_success \\\n-    'apply delta with trailing garbage literal' \\\n-    'printf \"\\0\\1\\1X\\1\" > tail_garbage_literal &&\n-     test_must_fail test-tool delta -p /dev/null tail_garbage_literal /dev/null'\n+test_expect_success 'apply delta with trailing garbage literal' '\n+\tprintf \"\\0\\1\\1X\\1\" > tail_garbage_literal &&\n+\ttest_must_fail test-tool delta -p /dev/null tail_garbage_literal /dev/null\n+'\n \n # \\4 - four bytes in base\n # \\1 - one byte in result\n@@ -387,19 +387,19 @@ test_expect_success \\\n # \\221 - copy, one byte offset, one byte size\n #   \\0 - copy from offset 0\n #   \\1 - copy 1 byte\n-test_expect_success \\\n-    'apply delta with trailing garbage copy' \\\n-    'printf \"\\4\\1\\1X\\221\\0\\1\" > tail_garbage_copy &&\n-     printf base >base &&\n-     test_must_fail test-tool delta -p /dev/null tail_garbage_copy /dev/null'\n+test_expect_success 'apply delta with trailing garbage copy' '\n+\tprintf \"\\4\\1\\1X\\221\\0\\1\" > tail_garbage_copy &&\n+\tprintf base >base &&\n+\ttest_must_fail test-tool delta -p /dev/null tail_garbage_copy /dev/null\n+'\n \n # \\0 - empty base\n # \\1 - one byte in result\n # \\1 - one literal byte (X)\n # \\0 - bogus opcode\n-test_expect_success \\\n-    'apply delta with trailing garbage opcode' \\\n-    'printf \"\\0\\1\\1X\\0\" > tail_garbage_opcode &&\n-     test_must_fail test-tool delta -p /dev/null tail_garbage_opcode /dev/null'\n+test_expect_success 'apply delta with trailing garbage opcode' '\n+\tprintf \"\\0\\1\\1X\\0\" > tail_garbage_opcode &&\n+\ttest_must_fail test-tool delta -p /dev/null tail_garbage_opcode /dev/null\n+'\n \n test_done\n-- \ngitgitgadget\n\n"},{"id":"477560","messageId":"3ddb6dbe9d5b2bbede84e389e57a33ded8bc7b3f.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 19/20] t6050-replace: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:24Z","receivedAt":"2023-05-18T20:04:28Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t6050-replace.sh | 296 ++++++++++++++++++++++-----------------------\n 1 file changed, 148 insertions(+), 148 deletions(-)\n\ndiff --git a/t/t6050-replace.sh b/t/t6050-replace.sh\nindex 2500acc2ef8..c9925edf20e 100755\n--- a/t/t6050-replace.sh\n+++ b/t/t6050-replace.sh\n@@ -62,59 +62,59 @@ HASH6=\n HASH7=\n \n test_expect_success 'set up buggy branch' '\n-     echo \"line 1\" >>hello &&\n-     echo \"line 2\" >>hello &&\n-     echo \"line 3\" >>hello &&\n-     echo \"line 4\" >>hello &&\n-     add_and_commit_file hello \"4 lines\" &&\n-     HASH1=$(git rev-parse --verify HEAD) &&\n-     echo \"line BUG\" >>hello &&\n-     echo \"line 6\" >>hello &&\n-     echo \"line 7\" >>hello &&\n-     echo \"line 8\" >>hello &&\n-     add_and_commit_file hello \"4 more lines with a BUG\" &&\n-     HASH2=$(git rev-parse --verify HEAD) &&\n-     echo \"line 9\" >>hello &&\n-     echo \"line 10\" >>hello &&\n-     add_and_commit_file hello \"2 more lines\" &&\n-     HASH3=$(git rev-parse --verify HEAD) &&\n-     echo \"line 11\" >>hello &&\n-     add_and_commit_file hello \"1 more line\" &&\n-     HASH4=$(git rev-parse --verify HEAD) &&\n-     sed -e \"s/BUG/5/\" hello >hello.new &&\n-     mv hello.new hello &&\n-     add_and_commit_file hello \"BUG fixed\" &&\n-     HASH5=$(git rev-parse --verify HEAD) &&\n-     echo \"line 12\" >>hello &&\n-     echo \"line 13\" >>hello &&\n-     add_and_commit_file hello \"2 more lines\" &&\n-     HASH6=$(git rev-parse --verify HEAD) &&\n-     echo \"line 14\" >>hello &&\n-     echo \"line 15\" >>hello &&\n-     echo \"line 16\" >>hello &&\n-     add_and_commit_file hello \"again 3 more lines\" &&\n-     HASH7=$(git rev-parse --verify HEAD)\n+\techo \"line 1\" >>hello &&\n+\techo \"line 2\" >>hello &&\n+\techo \"line 3\" >>hello &&\n+\techo \"line 4\" >>hello &&\n+\tadd_and_commit_file hello \"4 lines\" &&\n+\tHASH1=$(git rev-parse --verify HEAD) &&\n+\techo \"line BUG\" >>hello &&\n+\techo \"line 6\" >>hello &&\n+\techo \"line 7\" >>hello &&\n+\techo \"line 8\" >>hello &&\n+\tadd_and_commit_file hello \"4 more lines with a BUG\" &&\n+\tHASH2=$(git rev-parse --verify HEAD) &&\n+\techo \"line 9\" >>hello &&\n+\techo \"line 10\" >>hello &&\n+\tadd_and_commit_file hello \"2 more lines\" &&\n+\tHASH3=$(git rev-parse --verify HEAD) &&\n+\techo \"line 11\" >>hello &&\n+\tadd_and_commit_file hello \"1 more line\" &&\n+\tHASH4=$(git rev-parse --verify HEAD) &&\n+\tsed -e \"s/BUG/5/\" hello >hello.new &&\n+\tmv hello.new hello &&\n+\tadd_and_commit_file hello \"BUG fixed\" &&\n+\tHASH5=$(git rev-parse --verify HEAD) &&\n+\techo \"line 12\" >>hello &&\n+\techo \"line 13\" >>hello &&\n+\tadd_and_commit_file hello \"2 more lines\" &&\n+\tHASH6=$(git rev-parse --verify HEAD) &&\n+\techo \"line 14\" >>hello &&\n+\techo \"line 15\" >>hello &&\n+\techo \"line 16\" >>hello &&\n+\tadd_and_commit_file hello \"again 3 more lines\" &&\n+\tHASH7=$(git rev-parse --verify HEAD)\n '\n \n test_expect_success 'replace the author' '\n-     git cat-file commit $HASH2 | grep \"author A U Thor\" &&\n-     R=$(git cat-file commit $HASH2 | sed -e \"s/A U/O/\" | git hash-object -t commit --stdin -w) &&\n-     git cat-file commit $R | grep \"author O Thor\" &&\n-     git update-ref refs/replace/$HASH2 $R &&\n-     git show HEAD~5 | grep \"O Thor\" &&\n-     git show $HASH2 | grep \"O Thor\"\n+\tgit cat-file commit $HASH2 | grep \"author A U Thor\" &&\n+\tR=$(git cat-file commit $HASH2 | sed -e \"s/A U/O/\" | git hash-object -t commit --stdin -w) &&\n+\tgit cat-file commit $R | grep \"author O Thor\" &&\n+\tgit update-ref refs/replace/$HASH2 $R &&\n+\tgit show HEAD~5 | grep \"O Thor\" &&\n+\tgit show $HASH2 | grep \"O Thor\"\n '\n \n test_expect_success 'test --no-replace-objects option' '\n-     git cat-file commit $HASH2 | grep \"author O Thor\" &&\n-     git --no-replace-objects cat-file commit $HASH2 | grep \"author A U Thor\" &&\n-     git show $HASH2 | grep \"O Thor\" &&\n-     git --no-replace-objects show $HASH2 | grep \"A U Thor\"\n+\tgit cat-file commit $HASH2 | grep \"author O Thor\" &&\n+\tgit --no-replace-objects cat-file commit $HASH2 | grep \"author A U Thor\" &&\n+\tgit show $HASH2 | grep \"O Thor\" &&\n+\tgit --no-replace-objects show $HASH2 | grep \"A U Thor\"\n '\n \n test_expect_success 'test GIT_NO_REPLACE_OBJECTS env variable' '\n-     GIT_NO_REPLACE_OBJECTS=1 git cat-file commit $HASH2 | grep \"author A U Thor\" &&\n-     GIT_NO_REPLACE_OBJECTS=1 git show $HASH2 | grep \"A U Thor\"\n+\tGIT_NO_REPLACE_OBJECTS=1 git cat-file commit $HASH2 | grep \"author A U Thor\" &&\n+\tGIT_NO_REPLACE_OBJECTS=1 git show $HASH2 | grep \"A U Thor\"\n '\n \n test_expect_success 'test core.usereplacerefs config option' '\n@@ -132,64 +132,64 @@ tagger T A Gger <> 0 +0000\n EOF\n \n test_expect_success 'tag replaced commit' '\n-     git update-ref refs/tags/mytag $(git mktag <tag.sig)\n+\tgit update-ref refs/tags/mytag $(git mktag <tag.sig)\n '\n \n test_expect_success '\"git fsck\" works' '\n-     git fsck main >fsck_main.out &&\n-     test_i18ngrep \"dangling commit $R\" fsck_main.out &&\n-     test_i18ngrep \"dangling tag $(git show-ref -s refs/tags/mytag)\" fsck_main.out &&\n-     test -z \"$(git fsck)\"\n+\tgit fsck main >fsck_main.out &&\n+\ttest_i18ngrep \"dangling commit $R\" fsck_main.out &&\n+\ttest_i18ngrep \"dangling tag $(git show-ref -s refs/tags/mytag)\" fsck_main.out &&\n+\ttest -z \"$(git fsck)\"\n '\n \n test_expect_success 'repack, clone and fetch work' '\n-     git repack -a -d &&\n-     git clone --no-hardlinks . clone_dir &&\n-     (\n-\t  cd clone_dir &&\n-\t  git show HEAD~5 | grep \"A U Thor\" &&\n-\t  git show $HASH2 | grep \"A U Thor\" &&\n-\t  git cat-file commit $R &&\n-\t  git repack -a -d &&\n-\t  test_must_fail git cat-file commit $R &&\n-\t  git fetch ../ \"refs/replace/*:refs/replace/*\" &&\n-\t  git show HEAD~5 | grep \"O Thor\" &&\n-\t  git show $HASH2 | grep \"O Thor\" &&\n-\t  git cat-file commit $R\n-     )\n+\tgit repack -a -d &&\n+\tgit clone --no-hardlinks . clone_dir &&\n+\t(\n+\t\tcd clone_dir &&\n+\t\tgit show HEAD~5 | grep \"A U Thor\" &&\n+\t\tgit show $HASH2 | grep \"A U Thor\" &&\n+\t\tgit cat-file commit $R &&\n+\t\tgit repack -a -d &&\n+\t\ttest_must_fail git cat-file commit $R &&\n+\t\tgit fetch ../ \"refs/replace/*:refs/replace/*\" &&\n+\t\tgit show HEAD~5 | grep \"O Thor\" &&\n+\t\tgit show $HASH2 | grep \"O Thor\" &&\n+\t\tgit cat-file commit $R\n+\t)\n '\n \n test_expect_success '\"git replace\" listing and deleting' '\n-     test \"$HASH2\" = \"$(git replace -l)\" &&\n-     test \"$HASH2\" = \"$(git replace)\" &&\n-     aa=${HASH2%??????????????????????????????????????} &&\n-     test \"$HASH2\" = \"$(git replace --list \"$aa*\")\" &&\n-     test_must_fail git replace -d $R &&\n-     test_must_fail git replace --delete &&\n-     test_must_fail git replace -l -d $HASH2 &&\n-     git replace -d $HASH2 &&\n-     git show $HASH2 | grep \"A U Thor\" &&\n-     test -z \"$(git replace -l)\"\n+\ttest \"$HASH2\" = \"$(git replace -l)\" &&\n+\ttest \"$HASH2\" = \"$(git replace)\" &&\n+\taa=${HASH2%??????????????????????????????????????} &&\n+\ttest \"$HASH2\" = \"$(git replace --list \"$aa*\")\" &&\n+\ttest_must_fail git replace -d $R &&\n+\ttest_must_fail git replace --delete &&\n+\ttest_must_fail git replace -l -d $HASH2 &&\n+\tgit replace -d $HASH2 &&\n+\tgit show $HASH2 | grep \"A U Thor\" &&\n+\ttest -z \"$(git replace -l)\"\n '\n \n test_expect_success '\"git replace\" replacing' '\n-     git replace $HASH2 $R &&\n-     git show $HASH2 | grep \"O Thor\" &&\n-     test_must_fail git replace $HASH2 $R &&\n-     git replace -f $HASH2 $R &&\n-     test_must_fail git replace -f &&\n-     test \"$HASH2\" = \"$(git replace)\"\n+\tgit replace $HASH2 $R &&\n+\tgit show $HASH2 | grep \"O Thor\" &&\n+\ttest_must_fail git replace $HASH2 $R &&\n+\tgit replace -f $HASH2 $R &&\n+\ttest_must_fail git replace -f &&\n+\ttest \"$HASH2\" = \"$(git replace)\"\n '\n \n test_expect_success '\"git replace\" resolves sha1' '\n-     SHORTHASH2=$(git rev-parse --short=8 $HASH2) &&\n-     git replace -d $SHORTHASH2 &&\n-     git replace $SHORTHASH2 $R &&\n-     git show $HASH2 | grep \"O Thor\" &&\n-     test_must_fail git replace $HASH2 $R &&\n-     git replace -f $HASH2 $R &&\n-     test_must_fail git replace --force &&\n-     test \"$HASH2\" = \"$(git replace)\"\n+\tSHORTHASH2=$(git rev-parse --short=8 $HASH2) &&\n+\tgit replace -d $SHORTHASH2 &&\n+\tgit replace $SHORTHASH2 $R &&\n+\tgit show $HASH2 | grep \"O Thor\" &&\n+\ttest_must_fail git replace $HASH2 $R &&\n+\tgit replace -f $HASH2 $R &&\n+\ttest_must_fail git replace --force &&\n+\ttest \"$HASH2\" = \"$(git replace)\"\n '\n \n # This creates a side branch where the bug in H2\n@@ -207,79 +207,79 @@ test_expect_success '\"git replace\" resolves sha1' '\n # Then we replace H6 with P6.\n #\n test_expect_success 'create parallel branch without the bug' '\n-     git replace -d $HASH2 &&\n-     git show $HASH2 | grep \"A U Thor\" &&\n-     git checkout $HASH1 &&\n-     git cherry-pick $HASH2 &&\n-     git show $HASH5 | git apply &&\n-     git commit --amend -m \"hello: 4 more lines WITHOUT the bug\" hello &&\n-     PARA2=$(git rev-parse --verify HEAD) &&\n-     git cherry-pick $HASH3 &&\n-     PARA3=$(git rev-parse --verify HEAD) &&\n-     git cherry-pick $HASH4 &&\n-     PARA4=$(git rev-parse --verify HEAD) &&\n-     git cherry-pick $HASH6 &&\n-     PARA6=$(git rev-parse --verify HEAD) &&\n-     git replace $HASH6 $PARA6 &&\n-     git checkout main &&\n-     cur=$(git rev-parse --verify HEAD) &&\n-     test \"$cur\" = \"$HASH7\" &&\n-     git log --pretty=oneline | grep $PARA2 &&\n-     git remote add cloned ./clone_dir\n+\tgit replace -d $HASH2 &&\n+\tgit show $HASH2 | grep \"A U Thor\" &&\n+\tgit checkout $HASH1 &&\n+\tgit cherry-pick $HASH2 &&\n+\tgit show $HASH5 | git apply &&\n+\tgit commit --amend -m \"hello: 4 more lines WITHOUT the bug\" hello &&\n+\tPARA2=$(git rev-parse --verify HEAD) &&\n+\tgit cherry-pick $HASH3 &&\n+\tPARA3=$(git rev-parse --verify HEAD) &&\n+\tgit cherry-pick $HASH4 &&\n+\tPARA4=$(git rev-parse --verify HEAD) &&\n+\tgit cherry-pick $HASH6 &&\n+\tPARA6=$(git rev-parse --verify HEAD) &&\n+\tgit replace $HASH6 $PARA6 &&\n+\tgit checkout main &&\n+\tcur=$(git rev-parse --verify HEAD) &&\n+\ttest \"$cur\" = \"$HASH7\" &&\n+\tgit log --pretty=oneline | grep $PARA2 &&\n+\tgit remote add cloned ./clone_dir\n '\n \n test_expect_success 'push to cloned repo' '\n-     git push cloned $HASH6^:refs/heads/parallel &&\n-     (\n-\t  cd clone_dir &&\n-\t  git checkout parallel &&\n-\t  git log --pretty=oneline | grep $PARA2\n-     )\n+\tgit push cloned $HASH6^:refs/heads/parallel &&\n+\t(\n+\t\tcd clone_dir &&\n+\t\tgit checkout parallel &&\n+\t\tgit log --pretty=oneline | grep $PARA2\n+\t)\n '\n \n test_expect_success 'push branch with replacement' '\n-     git cat-file commit $PARA3 | grep \"author A U Thor\" &&\n-     S=$(git cat-file commit $PARA3 | sed -e \"s/A U/O/\" | git hash-object -t commit --stdin -w) &&\n-     git cat-file commit $S | grep \"author O Thor\" &&\n-     git replace $PARA3 $S &&\n-     git show $HASH6~2 | grep \"O Thor\" &&\n-     git show $PARA3 | grep \"O Thor\" &&\n-     git push cloned $HASH6^:refs/heads/parallel2 &&\n-     (\n-\t  cd clone_dir &&\n-\t  git checkout parallel2 &&\n-\t  git log --pretty=oneline | grep $PARA3 &&\n-\t  git show $PARA3 | grep \"A U Thor\"\n-     )\n+\tgit cat-file commit $PARA3 | grep \"author A U Thor\" &&\n+\tS=$(git cat-file commit $PARA3 | sed -e \"s/A U/O/\" | git hash-object -t commit --stdin -w) &&\n+\tgit cat-file commit $S | grep \"author O Thor\" &&\n+\tgit replace $PARA3 $S &&\n+\tgit show $HASH6~2 | grep \"O Thor\" &&\n+\tgit show $PARA3 | grep \"O Thor\" &&\n+\tgit push cloned $HASH6^:refs/heads/parallel2 &&\n+\t(\n+\t\tcd clone_dir &&\n+\t\tgit checkout parallel2 &&\n+\t\tgit log --pretty=oneline | grep $PARA3 &&\n+\t\tgit show $PARA3 | grep \"A U Thor\"\n+\t)\n '\n \n test_expect_success 'fetch branch with replacement' '\n-     git branch tofetch $HASH6 &&\n-     (\n-\t  cd clone_dir &&\n-\t  git fetch origin refs/heads/tofetch:refs/heads/parallel3 &&\n-\t  git log --pretty=oneline parallel3 >output.txt &&\n-\t  ! grep $PARA3 output.txt &&\n-\t  git show $PARA3 >para3.txt &&\n-\t  grep \"A U Thor\" para3.txt &&\n-\t  git fetch origin \"refs/replace/*:refs/replace/*\" &&\n-\t  git log --pretty=oneline parallel3 >output.txt &&\n-\t  grep $PARA3 output.txt &&\n-\t  git show $PARA3 >para3.txt &&\n-\t  grep \"O Thor\" para3.txt\n-     )\n+\tgit branch tofetch $HASH6 &&\n+\t(\n+\t\tcd clone_dir &&\n+\t\tgit fetch origin refs/heads/tofetch:refs/heads/parallel3 &&\n+\t\tgit log --pretty=oneline parallel3 >output.txt &&\n+\t\t! grep $PARA3 output.txt &&\n+\t\tgit show $PARA3 >para3.txt &&\n+\t\tgrep \"A U Thor\" para3.txt &&\n+\t\tgit fetch origin \"refs/replace/*:refs/replace/*\" &&\n+\t\tgit log --pretty=oneline parallel3 >output.txt &&\n+\t\tgrep $PARA3 output.txt &&\n+\t\tgit show $PARA3 >para3.txt &&\n+\t\tgrep \"O Thor\" para3.txt\n+\t)\n '\n \n test_expect_success 'bisect and replacements' '\n-     git bisect start $HASH7 $HASH1 &&\n-     test \"$PARA3\" = \"$(git rev-parse --verify HEAD)\" &&\n-     git bisect reset &&\n-     GIT_NO_REPLACE_OBJECTS=1 git bisect start $HASH7 $HASH1 &&\n-     test \"$HASH4\" = \"$(git rev-parse --verify HEAD)\" &&\n-     git bisect reset &&\n-     git --no-replace-objects bisect start $HASH7 $HASH1 &&\n-     test \"$HASH4\" = \"$(git rev-parse --verify HEAD)\" &&\n-     git bisect reset\n+\tgit bisect start $HASH7 $HASH1 &&\n+\ttest \"$PARA3\" = \"$(git rev-parse --verify HEAD)\" &&\n+\tgit bisect reset &&\n+\tGIT_NO_REPLACE_OBJECTS=1 git bisect start $HASH7 $HASH1 &&\n+\ttest \"$HASH4\" = \"$(git rev-parse --verify HEAD)\" &&\n+\tgit bisect reset &&\n+\tgit --no-replace-objects bisect start $HASH7 $HASH1 &&\n+\ttest \"$HASH4\" = \"$(git rev-parse --verify HEAD)\" &&\n+\tgit bisect reset\n '\n \n test_expect_success 'index-pack and replacements' '\n-- \ngitgitgadget\n\n"},{"id":"477561","messageId":"cb7716a0e1395c1488f3ebb6eda3c0f9da83615a.1684440206.git.gitgitgadget@gmail.com","threadId":"59767","inReplyTo":"pull.1513.git.git.1684440205.gitgitgadget@gmail.com","subject":"[PATCH 20/20] t7101-reset-empty-subdirs: modernize test format","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-18T20:03:25Z","receivedAt":"2023-05-18T20:04:30Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSome tests still use the old format with four spaces indentation.\nStandardize the tests to the new format with tab indentation.\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t7101-reset-empty-subdirs.sh | 48 +++++++++++++++++-----------------\n 1 file changed, 24 insertions(+), 24 deletions(-)\n\ndiff --git a/t/t7101-reset-empty-subdirs.sh b/t/t7101-reset-empty-subdirs.sh\nindex 638bb04e217..89cf98b30c8 100755\n--- a/t/t7101-reset-empty-subdirs.sh\n+++ b/t/t7101-reset-empty-subdirs.sh\n@@ -10,57 +10,57 @@ TEST_PASSES_SANITIZE_LEAK=true\n . \"$TEST_DIRECTORY\"/lib-diff-data.sh\n \n test_expect_success 'creating initial files' '\n-     mkdir path0 &&\n-     COPYING_test_data >path0/COPYING &&\n-     git add path0/COPYING &&\n-     git commit -m add -a\n+\tmkdir path0 &&\n+\tCOPYING_test_data >path0/COPYING &&\n+\tgit add path0/COPYING &&\n+\tgit commit -m add -a\n '\n \n test_expect_success 'creating second files' '\n-     mkdir path1 &&\n-     mkdir path1/path2 &&\n-     COPYING_test_data >path1/path2/COPYING &&\n-     COPYING_test_data >path1/COPYING &&\n-     COPYING_test_data >COPYING &&\n-     COPYING_test_data >path0/COPYING-TOO &&\n-     git add path1/path2/COPYING &&\n-     git add path1/COPYING &&\n-     git add COPYING &&\n-     git add path0/COPYING-TOO &&\n-     git commit -m change -a\n+\tmkdir path1 &&\n+\tmkdir path1/path2 &&\n+\tCOPYING_test_data >path1/path2/COPYING &&\n+\tCOPYING_test_data >path1/COPYING &&\n+\tCOPYING_test_data >COPYING &&\n+\tCOPYING_test_data >path0/COPYING-TOO &&\n+\tgit add path1/path2/COPYING &&\n+\tgit add path1/COPYING &&\n+\tgit add COPYING &&\n+\tgit add path0/COPYING-TOO &&\n+\tgit commit -m change -a\n '\n \n test_expect_success 'resetting tree HEAD^' '\n-     git reset --hard HEAD^\n+\tgit reset --hard HEAD^\n '\n \n test_expect_success 'checking initial files exist after rewind' '\n-     test -d path0 &&\n-     test -f path0/COPYING\n+\ttest -d path0 &&\n+\ttest -f path0/COPYING\n '\n \n test_expect_success 'checking lack of path1/path2/COPYING' '\n-    ! test -f path1/path2/COPYING\n+\t! test -f path1/path2/COPYING\n '\n \n test_expect_success 'checking lack of path1/COPYING' '\n-    ! test -f path1/COPYING\n+\t! test -f path1/COPYING\n '\n \n test_expect_success 'checking lack of COPYING' '\n-     ! test -f COPYING\n+\t! test -f COPYING\n '\n \n test_expect_success 'checking checking lack of path1/COPYING-TOO' '\n-     ! test -f path0/COPYING-TOO\n+\t! test -f path0/COPYING-TOO\n '\n \n test_expect_success 'checking lack of path1/path2' '\n-     ! test -d path1/path2\n+\t! test -d path1/path2\n '\n \n test_expect_success 'checking lack of path1' '\n-     ! test -d path1\n+\t! test -d path1\n '\n \n test_done\n-- \ngitgitgadget\n"},{"id":"477566","messageId":"CAPig+cT_Aq4zZjgf97oytqpox2KAMM_HtCGdfAmt7fPnHw9k3w@mail.gmail.com","threadId":"59767","inReplyTo":"b974c43ef661db2f34b157c853d59b01f35a4767.1684440205.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 01/20] t1000-basic: modernize test format","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-05-18T21:20:29Z","receivedAt":"2023-05-18T21:20:48Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, May 18, 2023 at 4:04 PM John Cai via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> t1000-basic: modernize test format\n\ns/t1000/t0000/\n\n> Some tests in t1000-basic.sh used the older four space indent format.\n> Update these to use tabs.\n\nDitto.\n\n> Signed-off-by: John Cai <johncai86@gmail.com>\n"},{"id":"477601","messageId":"xmqqlehkqmg6.fsf@gitster.g","threadId":"59767","inReplyTo":"4fe5e5cf9e068d20bbec3580df3030cd74ca4122.1684440205.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 03/20] t3210-pack-refs: modernize test format","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-05-19T17:07:37Z","receivedAt":"2023-05-19T17:09:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"John Cai via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> +test_expect_success A'see if up-to-date packed refs are preserved' '\n\nHuh?\n\n> +\tgit branch q &&\n> +\tgit pack-refs --all --prune &&\n> +\tgit update-ref refs/heads/q refs/heads/q &&\n> +\t! test -f .git/refs/heads/q\n> +'\n"},{"id":"477604","messageId":"1FB4B833-C883-4AC8-999E-FF3F56D621FE@gmail.com","threadId":"59767","inReplyTo":"xmqqlehkqmg6.fsf@gitster.g","subject":"Re: [PATCH 03/20] t3210-pack-refs: modernize test format","fromName":"John Cai","fromEmail":"johncai86@gmail.com","sentAt":"2023-05-19T17:52:06Z","receivedAt":"2023-05-19T17:52:11Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"\n\nOn 19 May 2023, at 13:07, Junio C Hamano wrote:\n\n> \"John Cai via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n>> +test_expect_success A'see if up-to-date packed refs are preserved' '\n>\n> Huh?\n\noops. not sure what happeend there.\n\n>\n>> +\tgit branch q &&\n>> +\tgit pack-refs --all --prune &&\n>> +\tgit update-ref refs/heads/q refs/heads/q &&\n>> +\t! test -f .git/refs/heads/q\n>> +'\n"},{"id":"477606","messageId":"xmqqa5y0qien.fsf@gitster.g","threadId":"59767","inReplyTo":"1FB4B833-C883-4AC8-999E-FF3F56D621FE@gmail.com","subject":"Re: [PATCH 03/20] t3210-pack-refs: modernize test format","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-05-19T18:34:56Z","receivedAt":"2023-05-19T18:35:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Cai <johncai86@gmail.com> writes:\n\n> On 19 May 2023, at 13:07, Junio C Hamano wrote:\n>\n>> \"John Cai via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>>\n>>> +test_expect_success A'see if up-to-date packed refs are preserved' '\n>>\n>> Huh?\n>\n> oops. not sure what happeend there.\n\nThat's OK.  I've locally tweaked this 'A' out and changed t1000s in\nthe description that wanted to talk about t0000 before queuing.\n\n"}]}