{"thread":{"id":"65986","subject":"[PATCH 0/2] t1100: modernize test script","startedAt":"2026-07-13T14:02:35Z","lastAt":"2026-07-14T16:43:25Z","messageCount":15,"participants":["Shlok Kulshreshtha","Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"547993","messageId":"20260713140142.27898-1-diy2903@gmail.com","threadId":"65986","inReplyTo":null,"subject":"[PATCH 0/2] t1100: modernize test script","fromName":"Shlok Kulshreshtha","fromEmail":"diy2903@gmail.com","sentAt":"2026-07-13T14:01:39Z","receivedAt":"2026-07-13T14:02:35Z","isPatch":true,"body":"Hi,\n\nThis is a GSoC/Outreachy microproject (\"Modernize a test script\").  It\ncleans up t/t1100-commit-tree-options.sh following the guidance Eric\nSunshine gave for t7001 in:\n\n  https://lore.kernel.org/git/CAPig+cQpUu2UO-+jWn1nTaDykWnxwuEitzVB7PnW2SS_b7V8Hg@mail.gmail.com/\n\nEach patch makes a single kind of change:\n\n  1/2 converts the tests from the old backslash-continued\n      test_expect_success style with space-indented bodies to the\n      modern quoted-body form indented with tabs.\n\n  2/2 moves the here-doc that creates the \"expected\" file out of the\n      script's top level and into the existing setup test, so it runs\n      under the protection of the test harness.\n\nThere is no change to what the tests actually verify; t1100 continues to\npass all 5 tests after each patch.\n\nI confirmed t1100 does not appear to be currently claimed on the list;\nplease let me know if someone is already working on it.\n\nThanks,\nShlok\n\nShlok Kulshreshtha (2):\n  t1100: modernize test style\n  t1100: move creation of expected output into setup test\n\n t/t1100-commit-tree-options.sh | 59 +++++++++++++++++-----------------\n 1 file changed, 29 insertions(+), 30 deletions(-)\n\n-- \n2.52.0\n\n"},{"id":"547994","messageId":"20260713140142.27898-2-diy2903@gmail.com","threadId":"65986","inReplyTo":"20260713140142.27898-1-diy2903@gmail.com","subject":"[PATCH 1/2] t1100: modernize test style","fromName":"Shlok Kulshreshtha","fromEmail":"diy2903@gmail.com","sentAt":"2026-07-13T14:01:40Z","receivedAt":"2026-07-13T14:02:41Z","isPatch":true,"body":"The tests in this script use the old style in which the test title and\nbody are passed as separate backslash-continued arguments, with bodies\nindented using spaces:\n\n    test_expect_success \\\n        'title' \\\n        'body'\n\nConvert them to the modern style in which the body is a single-quoted\nblock on its own lines, indented with a tab:\n\n    test_expect_success 'title' '\n        body\n    '\n\nThis is a style-only change; no test logic is modified.\n\nSigned-off-by: Shlok Kulshreshtha <diy2903@gmail.com>\n---\n t/t1100-commit-tree-options.sh | 44 +++++++++++++++++-----------------\n 1 file changed, 22 insertions(+), 22 deletions(-)\n\ndiff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh\nindex ae66ba5bab..fabe5a97cb 100755\n--- a/t/t1100-commit-tree-options.sh\n+++ b/t/t1100-commit-tree-options.sh\n@@ -22,28 +22,28 @@ committer Committer Name <committer@email> 1117150200 +0000\n comment text\n EOF\n \n-test_expect_success \\\n-    'test preparation: write empty tree' \\\n-    'git write-tree >treeid'\n-\n-test_expect_success \\\n-    'construct commit' \\\n-    'echo comment text |\n-     GIT_AUTHOR_NAME=\"Author Name\" \\\n-     GIT_AUTHOR_EMAIL=\"author@email\" \\\n-     GIT_AUTHOR_DATE=\"2005-05-26 23:00\" \\\n-     GIT_COMMITTER_NAME=\"Committer Name\" \\\n-     GIT_COMMITTER_EMAIL=\"committer@email\" \\\n-     GIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n-     TZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null'\n-\n-test_expect_success \\\n-    'read commit' \\\n-    'git cat-file commit $(cat commitid) >commit'\n-\n-test_expect_success \\\n-    'compare commit' \\\n-    'test_cmp expected commit'\n+test_expect_success 'test preparation: write empty tree' '\n+\tgit write-tree >treeid\n+'\n+\n+test_expect_success 'construct commit' '\n+\techo comment text |\n+\tGIT_AUTHOR_NAME=\"Author Name\" \\\n+\tGIT_AUTHOR_EMAIL=\"author@email\" \\\n+\tGIT_AUTHOR_DATE=\"2005-05-26 23:00\" \\\n+\tGIT_COMMITTER_NAME=\"Committer Name\" \\\n+\tGIT_COMMITTER_EMAIL=\"committer@email\" \\\n+\tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n+\tTZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null\n+'\n+\n+test_expect_success 'read commit' '\n+\tgit cat-file commit $(cat commitid) >commit\n+'\n+\n+test_expect_success 'compare commit' '\n+\ttest_cmp expected commit\n+'\n \n \n test_expect_success 'flags and then non flags' '\n-- \n2.52.0\n\n"},{"id":"547995","messageId":"20260713140142.27898-3-diy2903@gmail.com","threadId":"65986","inReplyTo":"20260713140142.27898-1-diy2903@gmail.com","subject":"[PATCH 2/2] t1100: move creation of expected output into setup test","fromName":"Shlok Kulshreshtha","fromEmail":"diy2903@gmail.com","sentAt":"2026-07-13T14:01:41Z","receivedAt":"2026-07-13T14:02:48Z","isPatch":true,"body":"The \"expected\" file was created at the top level of the script, outside\nof any test. Code that runs outside of a test is not protected by the\ntest harness: a failure there is not reported as a test failure and is\neasy to miss.\n\nMove the here-doc that creates \"expected\" into the existing setup test\n(\"test preparation: write empty tree\"), using a \"<<-\" here-doc so its\nbody can be indented along with the rest of the test.\n\nSigned-off-by: Shlok Kulshreshtha <diy2903@gmail.com>\n---\n t/t1100-commit-tree-options.sh | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh\nindex fabe5a97cb..b434d1848e 100755\n--- a/t/t1100-commit-tree-options.sh\n+++ b/t/t1100-commit-tree-options.sh\n@@ -14,15 +14,14 @@ Also make sure that command line parser understands the normal\n \n . ./test-lib.sh\n \n-cat >expected <<EOF\n-tree $EMPTY_TREE\n-author Author Name <author@email> 1117148400 +0000\n-committer Committer Name <committer@email> 1117150200 +0000\n-\n-comment text\n-EOF\n-\n test_expect_success 'test preparation: write empty tree' '\n+\tcat >expected <<-EOF &&\n+\ttree $EMPTY_TREE\n+\tauthor Author Name <author@email> 1117148400 +0000\n+\tcommitter Committer Name <committer@email> 1117150200 +0000\n+\n+\tcomment text\n+\tEOF\n \tgit write-tree >treeid\n '\n \n-- \n2.52.0\n\n"},{"id":"548015","messageId":"xmqqfr1mzx8z.fsf@gitster.g","threadId":"65986","inReplyTo":"20260713140142.27898-3-diy2903@gmail.com","subject":"Re: [PATCH 2/2] t1100: move creation of expected output into setup test","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-13T16:10:20Z","receivedAt":"2026-07-13T16:10:23Z","isPatch":true,"body":"Shlok Kulshreshtha <diy2903@gmail.com> writes:\n\n> The \"expected\" file was created at the top level of the script, outside\n\nUse the present tense to describe what the current code does.  For\nexample:\n\n    The 'expected' file is created at the top-level of the script,\n    outside ...\n\n> of any test. Code that runs outside of a test is not protected by the\n> test harness: a failure there is not reported as a test failure and is\n> easy to miss.\n>\n> Move the here-doc that creates \"expected\" into the existing setup test\n> (\"test preparation: write empty tree\"), using a \"<<-\" here-doc so its\n> body can be indented along with the rest of the test.\n>\n> Signed-off-by: Shlok Kulshreshtha <diy2903@gmail.com>\n> ---\n>  t/t1100-commit-tree-options.sh | 15 +++++++--------\n>  1 file changed, 7 insertions(+), 8 deletions(-)\n\nTrivially correct.\n\nThanks.\n\n>\n> diff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh\n> index fabe5a97cb..b434d1848e 100755\n> --- a/t/t1100-commit-tree-options.sh\n> +++ b/t/t1100-commit-tree-options.sh\n> @@ -14,15 +14,14 @@ Also make sure that command line parser understands the normal\n>  \n>  . ./test-lib.sh\n>  \n> -cat >expected <<EOF\n> -tree $EMPTY_TREE\n> -author Author Name <author@email> 1117148400 +0000\n> -committer Committer Name <committer@email> 1117150200 +0000\n> -\n> -comment text\n> -EOF\n> -\n>  test_expect_success 'test preparation: write empty tree' '\n> +\tcat >expected <<-EOF &&\n> +\ttree $EMPTY_TREE\n> +\tauthor Author Name <author@email> 1117148400 +0000\n> +\tcommitter Committer Name <committer@email> 1117150200 +0000\n> +\n> +\tcomment text\n> +\tEOF\n>  \tgit write-tree >treeid\n>  '\n"},{"id":"548019","messageId":"xmqqpl0qyhr6.fsf@gitster.g","threadId":"65986","inReplyTo":"20260713140142.27898-2-diy2903@gmail.com","subject":"Re: [PATCH 1/2] t1100: modernize test style","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-13T16:30:21Z","receivedAt":"2026-07-13T16:30:24Z","isPatch":true,"body":"Shlok Kulshreshtha <diy2903@gmail.com> writes:\n\n> The tests in this script use the old style in which the test title and\n> body are passed as separate backslash-continued arguments, with bodies\n> indented using spaces:\n>\n>     test_expect_success \\\n>         'title' \\\n>         'body'\n>\n> Convert them to the modern style in which the body is a single-quoted\n> block on its own lines, indented with a tab:\n>\n>     test_expect_success 'title' '\n>         body\n>     '\n>\n> This is a style-only change; no test logic is modified.\n\nCleanly done.  Running \"git show -w\" on this patch clearly\ndemonstrates that no code has changed.\n\nThanks.\n"},{"id":"548083","messageId":"20260714071633.35446-1-diy2903@gmail.com","threadId":"65986","inReplyTo":"20260713140142.27898-1-diy2903@gmail.com","subject":"[PATCH v2 0/2] t1100: modernize test script","fromName":"Shlok Kulshreshtha","fromEmail":"diy2903@gmail.com","sentAt":"2026-07-14T07:16:31Z","receivedAt":"2026-07-14T07:16:40Z","isPatch":true,"body":"This is v2 of the microproject cleaning up\nt/t1100-commit-tree-options.sh (\"Modernize a test script\").\n\nThanks to Junio for reviewing v1.  The only change since v1 is in the\ncommit message of patch 2/2: it now uses the present tense (\"is\ncreated\") to describe the current behavior of the script, as suggested.\nPatch 1/2 is unchanged.\n\n  1/2 converts the tests from the old backslash-continued\n      test_expect_success style with space-indented bodies to the\n      modern quoted-body form indented with tabs.\n\n  2/2 moves the here-doc that creates \"expected\" out of the script's\n      top level and into the existing setup test, so it runs under the\n      protection of the test harness.\n\nt1100 continues to pass all 5 tests.\n\nShlok Kulshreshtha (2):\n  t1100: modernize test style\n  t1100: move creation of expected output into setup test\n\n t/t1100-commit-tree-options.sh | 59 +++++++++++++++++-----------------\n 1 file changed, 29 insertions(+), 30 deletions(-)\n\nRange-diff against v1:\n1:  45f590f110 = 1:  45f590f110 t1100: modernize test style\n2:  f74c71c104 ! 2:  36ea70be9d t1100: move creation of expected output into setup test\n    @@ Metadata\n      ## Commit message ##\n         t1100: move creation of expected output into setup test\n     \n    -    The \"expected\" file was created at the top level of the script, outside\n    +    The \"expected\" file is created at the top-level of the script, outside\n         of any test. Code that runs outside of a test is not protected by the\n         test harness: a failure there is not reported as a test failure and is\n         easy to miss.\n-- \n2.52.0\n\n"},{"id":"548084","messageId":"20260714071633.35446-2-diy2903@gmail.com","threadId":"65986","inReplyTo":"20260714071633.35446-1-diy2903@gmail.com","subject":"[PATCH v2 1/2] t1100: modernize test style","fromName":"Shlok Kulshreshtha","fromEmail":"diy2903@gmail.com","sentAt":"2026-07-14T07:16:32Z","receivedAt":"2026-07-14T07:17:18Z","isPatch":true,"body":"The tests in this script use the old style in which the test title and\nbody are passed as separate backslash-continued arguments, with bodies\nindented using spaces:\n\n    test_expect_success \\\n        'title' \\\n        'body'\n\nConvert them to the modern style in which the body is a single-quoted\nblock on its own lines, indented with a tab:\n\n    test_expect_success 'title' '\n        body\n    '\n\nThis is a style-only change; no test logic is modified.\n\nSigned-off-by: Shlok Kulshreshtha <diy2903@gmail.com>\n---\n t/t1100-commit-tree-options.sh | 44 +++++++++++++++++-----------------\n 1 file changed, 22 insertions(+), 22 deletions(-)\n\ndiff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh\nindex ae66ba5bab..fabe5a97cb 100755\n--- a/t/t1100-commit-tree-options.sh\n+++ b/t/t1100-commit-tree-options.sh\n@@ -22,28 +22,28 @@ committer Committer Name <committer@email> 1117150200 +0000\n comment text\n EOF\n \n-test_expect_success \\\n-    'test preparation: write empty tree' \\\n-    'git write-tree >treeid'\n-\n-test_expect_success \\\n-    'construct commit' \\\n-    'echo comment text |\n-     GIT_AUTHOR_NAME=\"Author Name\" \\\n-     GIT_AUTHOR_EMAIL=\"author@email\" \\\n-     GIT_AUTHOR_DATE=\"2005-05-26 23:00\" \\\n-     GIT_COMMITTER_NAME=\"Committer Name\" \\\n-     GIT_COMMITTER_EMAIL=\"committer@email\" \\\n-     GIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n-     TZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null'\n-\n-test_expect_success \\\n-    'read commit' \\\n-    'git cat-file commit $(cat commitid) >commit'\n-\n-test_expect_success \\\n-    'compare commit' \\\n-    'test_cmp expected commit'\n+test_expect_success 'test preparation: write empty tree' '\n+\tgit write-tree >treeid\n+'\n+\n+test_expect_success 'construct commit' '\n+\techo comment text |\n+\tGIT_AUTHOR_NAME=\"Author Name\" \\\n+\tGIT_AUTHOR_EMAIL=\"author@email\" \\\n+\tGIT_AUTHOR_DATE=\"2005-05-26 23:00\" \\\n+\tGIT_COMMITTER_NAME=\"Committer Name\" \\\n+\tGIT_COMMITTER_EMAIL=\"committer@email\" \\\n+\tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n+\tTZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null\n+'\n+\n+test_expect_success 'read commit' '\n+\tgit cat-file commit $(cat commitid) >commit\n+'\n+\n+test_expect_success 'compare commit' '\n+\ttest_cmp expected commit\n+'\n \n \n test_expect_success 'flags and then non flags' '\n-- \n2.52.0\n\n"},{"id":"548085","messageId":"20260714071633.35446-3-diy2903@gmail.com","threadId":"65986","inReplyTo":"20260714071633.35446-1-diy2903@gmail.com","subject":"[PATCH v2 2/2] t1100: move creation of expected output into setup test","fromName":"Shlok Kulshreshtha","fromEmail":"diy2903@gmail.com","sentAt":"2026-07-14T07:16:33Z","receivedAt":"2026-07-14T07:17:25Z","isPatch":true,"body":"The \"expected\" file is created at the top-level of the script, outside\nof any test. Code that runs outside of a test is not protected by the\ntest harness: a failure there is not reported as a test failure and is\neasy to miss.\n\nMove the here-doc that creates \"expected\" into the existing setup test\n(\"test preparation: write empty tree\"), using a \"<<-\" here-doc so its\nbody can be indented along with the rest of the test.\n\nSigned-off-by: Shlok Kulshreshtha <diy2903@gmail.com>\n---\n t/t1100-commit-tree-options.sh | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh\nindex fabe5a97cb..b434d1848e 100755\n--- a/t/t1100-commit-tree-options.sh\n+++ b/t/t1100-commit-tree-options.sh\n@@ -14,15 +14,14 @@ Also make sure that command line parser understands the normal\n \n . ./test-lib.sh\n \n-cat >expected <<EOF\n-tree $EMPTY_TREE\n-author Author Name <author@email> 1117148400 +0000\n-committer Committer Name <committer@email> 1117150200 +0000\n-\n-comment text\n-EOF\n-\n test_expect_success 'test preparation: write empty tree' '\n+\tcat >expected <<-EOF &&\n+\ttree $EMPTY_TREE\n+\tauthor Author Name <author@email> 1117148400 +0000\n+\tcommitter Committer Name <committer@email> 1117150200 +0000\n+\n+\tcomment text\n+\tEOF\n \tgit write-tree >treeid\n '\n \n-- \n2.52.0\n\n"},{"id":"548089","messageId":"alXntdc-FO-1IHSV@pks.im","threadId":"65986","inReplyTo":"20260713140142.27898-2-diy2903@gmail.com","subject":"Re: [PATCH 1/2] t1100: modernize test style","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-14T07:39:33Z","receivedAt":"2026-07-14T07:39:44Z","isPatch":true,"body":"On Mon, Jul 13, 2026 at 07:31:40PM +0530, Shlok Kulshreshtha wrote:\n> diff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh\n> index ae66ba5bab..fabe5a97cb 100755\n> --- a/t/t1100-commit-tree-options.sh\n> +++ b/t/t1100-commit-tree-options.sh\n> @@ -22,28 +22,28 @@ committer Committer Name <committer@email> 1117150200 +0000\n>  comment text\n>  EOF\n>  \n> -test_expect_success \\\n> -    'test preparation: write empty tree' \\\n> -    'git write-tree >treeid'\n> -\n> -test_expect_success \\\n> -    'construct commit' \\\n> -    'echo comment text |\n> -     GIT_AUTHOR_NAME=\"Author Name\" \\\n> -     GIT_AUTHOR_EMAIL=\"author@email\" \\\n> -     GIT_AUTHOR_DATE=\"2005-05-26 23:00\" \\\n> -     GIT_COMMITTER_NAME=\"Committer Name\" \\\n> -     GIT_COMMITTER_EMAIL=\"committer@email\" \\\n> -     GIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n> -     TZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null'\n> -\n> -test_expect_success \\\n> -    'read commit' \\\n> -    'git cat-file commit $(cat commitid) >commit'\n> -\n> -test_expect_success \\\n> -    'compare commit' \\\n> -    'test_cmp expected commit'\n> +test_expect_success 'test preparation: write empty tree' '\n> +\tgit write-tree >treeid\n> +'\n> +\n> +test_expect_success 'construct commit' '\n> +\techo comment text |\n> +\tGIT_AUTHOR_NAME=\"Author Name\" \\\n> +\tGIT_AUTHOR_EMAIL=\"author@email\" \\\n> +\tGIT_AUTHOR_DATE=\"2005-05-26 23:00\" \\\n> +\tGIT_COMMITTER_NAME=\"Committer Name\" \\\n> +\tGIT_COMMITTER_EMAIL=\"committer@email\" \\\n> +\tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n> +\tTZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null\n> +'\n> +\n> +test_expect_success 'read commit' '\n> +\tgit cat-file commit $(cat commitid) >commit\n> +'\n> +\n> +test_expect_success 'compare commit' '\n> +\ttest_cmp expected commit\n> +'\n>  \n>  \n>  test_expect_success 'flags and then non flags' '\n\nNit: let's remove the extraneous empty line while at it.\n\nPatrick\n"},{"id":"548121","messageId":"20260714122033.61947-1-diy2903@gmail.com","threadId":"65986","inReplyTo":"20260714071633.35446-1-diy2903@gmail.com","subject":"[PATCH v3 0/2] t1100: modernize test script","fromName":"Shlok Kulshreshtha","fromEmail":"diy2903@gmail.com","sentAt":"2026-07-14T12:20:31Z","receivedAt":"2026-07-14T12:20:41Z","isPatch":true,"body":"This is v3 of the microproject cleaning up\nt/t1100-commit-tree-options.sh (\"Modernize a test script\").\n\nApologies, v2 crossed with Patrick's review of v1. This v3 folds in his\nfeedback as well.\n\nChanges since v2:\n  - Patch 1/2: also drop the extraneous blank line before the \"flags\n    and then non flags\" test, as Patrick suggested.\n\nChanges since v1 (carried over from v2):\n  - Patch 2/2: reword the commit message to use the present tense, as\n    Junio suggested.\n\nThe patches themselves:\n\n  1/2 converts the tests from the old backslash-continued\n      test_expect_success style with space-indented bodies to the modern\n      quoted-body form indented with tabs, and removes an extraneous\n      blank line between two tests.\n\n  2/2 moves the here-doc that creates \"expected\" out of the script's top\n      level and into the existing setup test, so it runs under the\n      protection of the test harness.\n\nt1100 continues to pass all 5 tests.\n\nShlok Kulshreshtha (2):\n  t1100: modernize test style\n  t1100: move creation of expected output into setup test\n\n t/t1100-commit-tree-options.sh | 58 ++++++++++++++++------------------\n 1 file changed, 28 insertions(+), 30 deletions(-)\n\nRange-diff against v2:\n1:  45f590f110 ! 1:  e299f096b9 t1100: modernize test style\n    @@ Commit message\n                 body\n             '\n     \n    +    While at it, remove an extraneous blank line between two tests.\n    +\n         This is a style-only change; no test logic is modified.\n     \n         Signed-off-by: Shlok Kulshreshtha <diy2903@gmail.com>\n    @@ t/t1100-commit-tree-options.sh: committer Committer Name <committer@email> 11171\n     +\tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n     +\tTZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null\n     +'\n    -+\n    + \n     +test_expect_success 'read commit' '\n     +\tgit cat-file commit $(cat commitid) >commit\n     +'\n    @@ t/t1100-commit-tree-options.sh: committer Committer Name <committer@email> 11171\n     +\ttest_cmp expected commit\n     +'\n      \n    - \n      test_expect_success 'flags and then non flags' '\n    + \ttest_tick &&\n2:  36ea70be9d = 2:  5a54427820 t1100: move creation of expected output into setup test\n-- \n2.52.0\n\n"},{"id":"548122","messageId":"20260714122033.61947-2-diy2903@gmail.com","threadId":"65986","inReplyTo":"20260714122033.61947-1-diy2903@gmail.com","subject":"[PATCH v3 1/2] t1100: modernize test style","fromName":"Shlok Kulshreshtha","fromEmail":"diy2903@gmail.com","sentAt":"2026-07-14T12:20:32Z","receivedAt":"2026-07-14T12:20:45Z","isPatch":true,"body":"The tests in this script use the old style in which the test title and\nbody are passed as separate backslash-continued arguments, with bodies\nindented using spaces:\n\n    test_expect_success \\\n        'title' \\\n        'body'\n\nConvert them to the modern style in which the body is a single-quoted\nblock on its own lines, indented with a tab:\n\n    test_expect_success 'title' '\n        body\n    '\n\nWhile at it, remove an extraneous blank line between two tests.\n\nThis is a style-only change; no test logic is modified.\n\nSigned-off-by: Shlok Kulshreshtha <diy2903@gmail.com>\n---\n t/t1100-commit-tree-options.sh | 43 +++++++++++++++++-----------------\n 1 file changed, 21 insertions(+), 22 deletions(-)\n\ndiff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh\nindex ae66ba5bab..9a639f946c 100755\n--- a/t/t1100-commit-tree-options.sh\n+++ b/t/t1100-commit-tree-options.sh\n@@ -22,29 +22,28 @@ committer Committer Name <committer@email> 1117150200 +0000\n comment text\n EOF\n \n-test_expect_success \\\n-    'test preparation: write empty tree' \\\n-    'git write-tree >treeid'\n-\n-test_expect_success \\\n-    'construct commit' \\\n-    'echo comment text |\n-     GIT_AUTHOR_NAME=\"Author Name\" \\\n-     GIT_AUTHOR_EMAIL=\"author@email\" \\\n-     GIT_AUTHOR_DATE=\"2005-05-26 23:00\" \\\n-     GIT_COMMITTER_NAME=\"Committer Name\" \\\n-     GIT_COMMITTER_EMAIL=\"committer@email\" \\\n-     GIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n-     TZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null'\n-\n-test_expect_success \\\n-    'read commit' \\\n-    'git cat-file commit $(cat commitid) >commit'\n-\n-test_expect_success \\\n-    'compare commit' \\\n-    'test_cmp expected commit'\n+test_expect_success 'test preparation: write empty tree' '\n+\tgit write-tree >treeid\n+'\n+\n+test_expect_success 'construct commit' '\n+\techo comment text |\n+\tGIT_AUTHOR_NAME=\"Author Name\" \\\n+\tGIT_AUTHOR_EMAIL=\"author@email\" \\\n+\tGIT_AUTHOR_DATE=\"2005-05-26 23:00\" \\\n+\tGIT_COMMITTER_NAME=\"Committer Name\" \\\n+\tGIT_COMMITTER_EMAIL=\"committer@email\" \\\n+\tGIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n+\tTZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null\n+'\n \n+test_expect_success 'read commit' '\n+\tgit cat-file commit $(cat commitid) >commit\n+'\n+\n+test_expect_success 'compare commit' '\n+\ttest_cmp expected commit\n+'\n \n test_expect_success 'flags and then non flags' '\n \ttest_tick &&\n-- \n2.52.0\n\n"},{"id":"548123","messageId":"20260714122033.61947-3-diy2903@gmail.com","threadId":"65986","inReplyTo":"20260714122033.61947-1-diy2903@gmail.com","subject":"[PATCH v3 2/2] t1100: move creation of expected output into setup test","fromName":"Shlok Kulshreshtha","fromEmail":"diy2903@gmail.com","sentAt":"2026-07-14T12:20:33Z","receivedAt":"2026-07-14T12:20:51Z","isPatch":true,"body":"The \"expected\" file is created at the top-level of the script, outside\nof any test. Code that runs outside of a test is not protected by the\ntest harness: a failure there is not reported as a test failure and is\neasy to miss.\n\nMove the here-doc that creates \"expected\" into the existing setup test\n(\"test preparation: write empty tree\"), using a \"<<-\" here-doc so its\nbody can be indented along with the rest of the test.\n\nSigned-off-by: Shlok Kulshreshtha <diy2903@gmail.com>\n---\n t/t1100-commit-tree-options.sh | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh\nindex 9a639f946c..3e888909f5 100755\n--- a/t/t1100-commit-tree-options.sh\n+++ b/t/t1100-commit-tree-options.sh\n@@ -14,15 +14,14 @@ Also make sure that command line parser understands the normal\n \n . ./test-lib.sh\n \n-cat >expected <<EOF\n-tree $EMPTY_TREE\n-author Author Name <author@email> 1117148400 +0000\n-committer Committer Name <committer@email> 1117150200 +0000\n-\n-comment text\n-EOF\n-\n test_expect_success 'test preparation: write empty tree' '\n+\tcat >expected <<-EOF &&\n+\ttree $EMPTY_TREE\n+\tauthor Author Name <author@email> 1117148400 +0000\n+\tcommitter Committer Name <committer@email> 1117150200 +0000\n+\n+\tcomment text\n+\tEOF\n \tgit write-tree >treeid\n '\n \n-- \n2.52.0\n\n"},{"id":"548130","messageId":"alZADk3gB5GRxUiC@pks.im","threadId":"65986","inReplyTo":"20260714122033.61947-1-diy2903@gmail.com","subject":"Re: [PATCH v3 0/2] t1100: modernize test script","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-14T13:56:30Z","receivedAt":"2026-07-14T13:56:37Z","isPatch":true,"body":"On Tue, Jul 14, 2026 at 05:50:31PM +0530, Shlok Kulshreshtha wrote:\n> This is v3 of the microproject cleaning up\n> t/t1100-commit-tree-options.sh (\"Modernize a test script\").\n> \n> Apologies, v2 crossed with Patrick's review of v1. This v3 folds in his\n> feedback as well.\n> \n> Changes since v2:\n>   - Patch 1/2: also drop the extraneous blank line before the \"flags\n>     and then non flags\" test, as Patrick suggested.\n> \n> Changes since v1 (carried over from v2):\n>   - Patch 2/2: reword the commit message to use the present tense, as\n>     Junio suggested.\n\nThanks, this version looks good to me.\n\nPatrick\n"},{"id":"548132","messageId":"xmqqh5m1vb36.fsf@gitster.g","threadId":"65986","inReplyTo":"alZADk3gB5GRxUiC@pks.im","subject":"Re: [PATCH v3 0/2] t1100: modernize test script","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-14T15:34:53Z","receivedAt":"2026-07-14T15:34:55Z","isPatch":true,"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> On Tue, Jul 14, 2026 at 05:50:31PM +0530, Shlok Kulshreshtha wrote:\n>> This is v3 of the microproject cleaning up\n>> t/t1100-commit-tree-options.sh (\"Modernize a test script\").\n>> \n>> Apologies, v2 crossed with Patrick's review of v1. This v3 folds in his\n>> feedback as well.\n>> \n>> Changes since v2:\n>>   - Patch 1/2: also drop the extraneous blank line before the \"flags\n>>     and then non flags\" test, as Patrick suggested.\n>> \n>> Changes since v1 (carried over from v2):\n>>   - Patch 2/2: reword the commit message to use the present tense, as\n>>     Junio suggested.\n>\n> Thanks, this version looks good to me.\n\nThanks.\n"},{"id":"548135","messageId":"xmqq4ii1v7x0.fsf@gitster.g","threadId":"65986","inReplyTo":"20260714122033.61947-1-diy2903@gmail.com","subject":"Re: [PATCH v3 0/2] t1100: modernize test script","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-14T16:43:23Z","receivedAt":"2026-07-14T16:43:25Z","isPatch":true,"body":"Shlok Kulshreshtha <diy2903@gmail.com> writes:\n\n> This is v3 of the microproject cleaning up\n> t/t1100-commit-tree-options.sh (\"Modernize a test script\").\n>\n> Apologies, v2 crossed with Patrick's review of v1. This v3 folds in his\n> feedback as well.\n\nLooking good.  Will replace, and mark the topic for 'next'.\n\nThanks.\n"}]}