{"thread":{"id":"62440","subject":"[PATCH] t1016: clean up style","startedAt":"2024-11-02T16:55:42Z","lastAt":"2024-11-04T09:06:56Z","messageCount":8,"participants":["Andrew Kreimer","Kristoffer Haugsbakk","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"506487","messageId":"20241102165534.17112-1-algonell@gmail.com","threadId":"62440","inReplyTo":null,"subject":"[PATCH] t1016: clean up style","fromName":"Andrew Kreimer","fromEmail":"algonell@gmail.com","sentAt":"2024-11-02T16:53:10Z","receivedAt":"2024-11-02T16:55:42Z","isPatch":true,"sender":{"key":"algonell@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4669001?v=4"},"body":"Remove whitespace after redirect operator.\n\nAlign mixed space/tab usages.\n\nSigned-off-by: Andrew Kreimer <algonell@gmail.com>\n---\n t/t1016-compatObjectFormat.sh | 261 +++++++++++++++++-----------------\n 1 file changed, 130 insertions(+), 131 deletions(-)\n\ndiff --git a/t/t1016-compatObjectFormat.sh b/t/t1016-compatObjectFormat.sh\nindex 8341a2fe83..06449937a3 100755\n--- a/t/t1016-compatObjectFormat.sh\n+++ b/t/t1016-compatObjectFormat.sh\n@@ -24,84 +24,84 @@ TEST_PASSES_SANITIZE_LEAK=true\n # the commit is identical to the commit in the other repository.\n \n compat_hash () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"sha256\"\n-\t;;\n-    \"sha256\")\n-\techo \"sha1\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"sha256\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"sha1\"\n+\t\t;;\n+\tesac\n }\n \n hello_oid () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"$hello_sha1_oid\"\n-\t;;\n-    \"sha256\")\n-\techo \"$hello_sha256_oid\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"$hello_sha1_oid\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"$hello_sha256_oid\"\n+\t\t;;\n+\tesac\n }\n \n tree_oid () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"$tree_sha1_oid\"\n-\t;;\n-    \"sha256\")\n-\techo \"$tree_sha256_oid\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"$tree_sha1_oid\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"$tree_sha256_oid\"\n+\t\t;;\n+\tesac\n }\n \n commit_oid () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"$commit_sha1_oid\"\n-\t;;\n-    \"sha256\")\n-\techo \"$commit_sha256_oid\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"$commit_sha1_oid\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"$commit_sha256_oid\"\n+\t\t;;\n+\tesac\n }\n \n commit2_oid () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"$commit2_sha1_oid\"\n-\t;;\n-    \"sha256\")\n-\techo \"$commit2_sha256_oid\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"$commit2_sha1_oid\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"$commit2_sha256_oid\"\n+\t\t;;\n+\tesac\n }\n \n del_sigcommit () {\n-    local delete=\"$1\"\n-\n-    if test \"$delete\" = \"sha256\" ; then\n-\tlocal pattern=\"gpgsig-sha256\"\n-    else\n-\tlocal pattern=\"gpgsig\"\n-    fi\n-    test-tool delete-gpgsig \"$pattern\"\n+\tlocal delete=\"$1\"\n+\n+\tif test \"$delete\" = \"sha256\" ; then\n+\t\tlocal pattern=\"gpgsig-sha256\"\n+\telse\n+\t\tlocal pattern=\"gpgsig\"\n+\tfi\n+\ttest-tool delete-gpgsig \"$pattern\"\n }\n \n \n del_sigtag () {\n-    local storage=\"$1\"\n-    local delete=\"$2\"\n-\n-    if test \"$storage\" = \"$delete\" ; then\n-\tlocal pattern=\"trailer\"\n-    elif test \"$storage\" = \"sha256\" ; then\n-\tlocal pattern=\"gpgsig\"\n-    else\n-\tlocal pattern=\"gpgsig-sha256\"\n-    fi\n-    test-tool delete-gpgsig \"$pattern\"\n+\tlocal storage=\"$1\"\n+\tlocal delete=\"$2\"\n+\n+\tif test \"$storage\" = \"$delete\" ; then\n+\t\tlocal pattern=\"trailer\"\n+\telif test \"$storage\" = \"sha256\" ; then\n+\t\tlocal pattern=\"gpgsig\"\n+\telse\n+\t\tlocal pattern=\"gpgsig-sha256\"\n+\tfi\n+\ttest-tool delete-gpgsig \"$pattern\"\n }\n \n base=$(pwd)\n@@ -146,9 +146,9 @@ do\n \t'\n \ttest_expect_success \"create a $hash branch\" '\n \t\tgit checkout -b branch $(commit_oid $hash) &&\n-\t\techo \"More more more give me more!\" > more &&\n+\t\techo \"More more more give me more!\" >more &&\n \t\teval more_${hash}_oid=$(git hash-object more) &&\n-\t\techo \"Another and another and another\" > another &&\n+\t\techo \"Another and another and another\" >another &&\n \t\teval another_${hash}_oid=$(git hash-object another) &&\n \t\tgit update-index --add more another &&\n \t\tgit commit -m \"Add more files!\" &&\n@@ -165,15 +165,15 @@ do\n \t'\n \ttest_expect_success GPG2 \"create additional $hash signed commits\" '\n \t\tgit commit --gpg-sign --allow-empty -m \"This is an additional signed commit\" &&\n-\t\tgit cat-file commit HEAD | del_sigcommit sha256 > \"../${hash}_signedcommit3\" &&\n-\t\tgit cat-file commit HEAD | del_sigcommit sha1 > \"../${hash}_signedcommit4\" &&\n+\t\tgit cat-file commit HEAD | del_sigcommit sha256 >\"../${hash}_signedcommit3\" &&\n+\t\tgit cat-file commit HEAD | del_sigcommit sha1 >\"../${hash}_signedcommit4\" &&\n \t\teval signedcommit3_${hash}_oid=$(git hash-object -t commit -w ../${hash}_signedcommit3) &&\n \t\teval signedcommit4_${hash}_oid=$(git hash-object -t commit -w ../${hash}_signedcommit4)\n \t'\n \ttest_expect_success GPG2 \"create additional $hash signed tags\" '\n \t\tgit tag -s -m \"This is an additional signed tag\" signedtag34 HEAD &&\n-\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha256 > ../${hash}_signedtag3 &&\n-\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha1 > ../${hash}_signedtag4 &&\n+\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha256 >../${hash}_signedtag3 &&\n+\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha1 >../${hash}_signedtag4 &&\n \t\teval signedtag3_${hash}_oid=$(git hash-object -t tag -w ../${hash}_signedtag3) &&\n \t\teval signedtag4_${hash}_oid=$(git hash-object -t tag -w ../${hash}_signedtag4)\n \t'\n@@ -181,81 +181,80 @@ done\n cd \"$base\"\n \n compare_oids () {\n-    test \"$#\" = 5 && { local PREREQ=\"$1\"; shift; } || PREREQ=\n-    local type=\"$1\"\n-    local name=\"$2\"\n-    local sha1_oid=\"$3\"\n-    local sha256_oid=\"$4\"\n-\n-    echo ${sha1_oid} > ${name}_sha1_expected\n-    echo ${sha256_oid} > ${name}_sha256_expected\n-    echo ${type} > ${name}_type_expected\n-\n-    git --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} > ${name}_sha1_sha256_found\n-    git --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} > ${name}_sha256_sha1_found\n-    local sha1_sha256_oid=\"$(cat ${name}_sha1_sha256_found)\"\n-    local sha256_sha1_oid=\"$(cat ${name}_sha256_sha1_found)\"\n-\n-    test_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n-\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} > ${name}_sha1 &&\n-\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n-'\n-\n-    test_expect_success $PREREQ \"Verify ${type} ${name}'s sha256 oid\" '\n-\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} > ${name}_sha256 &&\n-\ttest_cmp ${name}_sha256 ${name}_sha256_expected\n-'\n+\ttest \"$#\" = 5 && { local PREREQ=\"$1\"; shift; } || PREREQ=\n+\tlocal type=\"$1\"\n+\tlocal name=\"$2\"\n+\tlocal sha1_oid=\"$3\"\n+\tlocal sha256_oid=\"$4\"\n+\n+\techo ${sha1_oid} >${name}_sha1_expected\n+\techo ${sha256_oid} >${name}_sha256_expected\n+\techo ${type} >${name}_type_expected\n+\n+\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} >${name}_sha1_sha256_found\n+\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} >${name}_sha256_sha1_found\n+\tlocal sha1_sha256_oid=\"$(cat ${name}_sha1_sha256_found)\"\n+\tlocal sha256_sha1_oid=\"$(cat ${name}_sha256_sha1_found)\"\n+\n+\ttest_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n+\t\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} >${name}_sha1 &&\n+\t\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha1 type\" '\n-\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_oid} > ${name}_type1 &&\n-\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_sha1_oid} > ${name}_type2 &&\n-\ttest_cmp ${name}_type1 ${name}_type2 &&\n-\ttest_cmp ${name}_type1 ${name}_type_expected\n-'\n+\ttest_expect_success $PREREQ \"Verify ${type} ${name}'s sha256 oid\" '\n+\t\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} >${name}_sha256 &&\n+\t\ttest_cmp ${name}_sha256 ${name}_sha256_expected\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha256 type\" '\n-\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_oid} > ${name}_type3 &&\n-\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_sha256_oid} > ${name}_type4 &&\n-\ttest_cmp ${name}_type3 ${name}_type4 &&\n-\ttest_cmp ${name}_type3 ${name}_type_expected\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 type\" '\n+\t\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_oid} >${name}_type1 &&\n+\t\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_sha1_oid} >${name}_type2 &&\n+\t\ttest_cmp ${name}_type1 ${name}_type2 &&\n+\t\ttest_cmp ${name}_type1 ${name}_type_expected\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha1 size\" '\n-\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_oid} > ${name}_size1 &&\n-\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_sha1_oid} > ${name}_size2 &&\n-\ttest_cmp ${name}_size1 ${name}_size2\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 type\" '\n+\t\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_oid} >${name}_type3 &&\n+\t\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_sha256_oid} >${name}_type4 &&\n+\t\ttest_cmp ${name}_type3 ${name}_type4 &&\n+\t\ttest_cmp ${name}_type3 ${name}_type_expected\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha256 size\" '\n-\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_oid} > ${name}_size3 &&\n-\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_sha256_oid} > ${name}_size4 &&\n-\ttest_cmp ${name}_size3 ${name}_size4\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 size\" '\n+\t\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_oid} >${name}_size1 &&\n+\t\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_sha1_oid} >${name}_size2 &&\n+\t\ttest_cmp ${name}_size1 ${name}_size2\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha1 pretty content\" '\n-\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_oid} > ${name}_content1 &&\n-\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_sha1_oid} > ${name}_content2 &&\n-\ttest_cmp ${name}_content1 ${name}_content2\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 size\" '\n+\t\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_oid} >${name}_size3 &&\n+\t\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_sha256_oid} >${name}_size4 &&\n+\t\ttest_cmp ${name}_size3 ${name}_size4\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha256 pretty content\" '\n-\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_oid} > ${name}_content3 &&\n-\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_sha256_oid} > ${name}_content4 &&\n-\ttest_cmp ${name}_content3 ${name}_content4\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 pretty content\" '\n+\t\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_oid} >${name}_content1 &&\n+\t\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_sha1_oid} >${name}_content2 &&\n+\t\ttest_cmp ${name}_content1 ${name}_content2\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha1 content\" '\n-\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_oid} > ${name}_content5 &&\n-\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_sha1_oid} > ${name}_content6 &&\n-\ttest_cmp ${name}_content5 ${name}_content6\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 pretty content\" '\n+\t\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_oid} >${name}_content3 &&\n+\t\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_sha256_oid} >${name}_content4 &&\n+\t\ttest_cmp ${name}_content3 ${name}_content4\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha256 content\" '\n-\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_oid} > ${name}_content7 &&\n-\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_sha256_oid} > ${name}_content8 &&\n-\ttest_cmp ${name}_content7 ${name}_content8\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 content\" '\n+\t\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_oid} >${name}_content5 &&\n+\t\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_sha1_oid} >${name}_content6 &&\n+\t\ttest_cmp ${name}_content5 ${name}_content6\n+\t'\n \n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 content\" '\n+\t\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_oid} >${name}_content7 &&\n+\t\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_sha256_oid} >${name}_content8 &&\n+\t\ttest_cmp ${name}_content7 ${name}_content8\n+\t'\n }\n \n compare_oids 'blob' hello \"$hello_sha1_oid\" \"$hello_sha256_oid\"\n-- \n2.47.0.170.g23d289d273.dirty\n\n"},{"id":"506488","messageId":"2a385fcd-7cb2-4d6c-8372-2139f11c85a8@app.fastmail.com","threadId":"62440","inReplyTo":"20241102165534.17112-1-algonell@gmail.com","subject":"Re: [PATCH] t1016: clean up style","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-11-02T19:11:02Z","receivedAt":"2024-11-02T19:11:37Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"Hi\n\nThis looks correct according to CodingGuidelines, part “For shell\nscripts”.\n\n• Whitespace and redirect operator\n• Case arms indentation\n• Tabs for indentation.  It might look like some of the lines in the\n  preimage (term?) use two nesting levels set to four columns, but that\n  is because the first line is indented by four spaces and the next line\n  is indented with one tab (eight columns).  The postimage changes them\n  to use one tab per level.\n\nOn Sat, Nov 2, 2024, at 17:53, Andrew Kreimer wrote:\n> Remove whitespace after redirect operator.\n>\n> Align mixed space/tab usages.\n>\n> Signed-off-by: Andrew Kreimer <algonell@gmail.com>\n> ---\n>  t/t1016-compatObjectFormat.sh | 261 +++++++++++++++++-----------------\n>  1 file changed, 130 insertions(+), 131 deletions(-)\n>\n> diff --git a/t/t1016-compatObjectFormat.sh b/t/t1016-compatObjectFormat.sh\n> index 8341a2fe83..06449937a3 100755\n> --- a/t/t1016-compatObjectFormat.sh\n> +++ b/t/t1016-compatObjectFormat.sh\n> @@ -24,84 +24,84 @@ TEST_PASSES_SANITIZE_LEAK=true\n>  # the commit is identical to the commit in the other repository.\n>\n>  compat_hash () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"sha256\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"sha1\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"sha256\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"sha1\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  hello_oid () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"$hello_sha1_oid\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"$hello_sha256_oid\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"$hello_sha1_oid\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"$hello_sha256_oid\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  tree_oid () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"$tree_sha1_oid\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"$tree_sha256_oid\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"$tree_sha1_oid\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"$tree_sha256_oid\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  commit_oid () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"$commit_sha1_oid\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"$commit_sha256_oid\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"$commit_sha1_oid\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"$commit_sha256_oid\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  commit2_oid () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"$commit2_sha1_oid\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"$commit2_sha256_oid\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"$commit2_sha1_oid\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"$commit2_sha256_oid\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  del_sigcommit () {\n> -    local delete=\"$1\"\n> -\n> -    if test \"$delete\" = \"sha256\" ; then\n> -\tlocal pattern=\"gpgsig-sha256\"\n> -    else\n> -\tlocal pattern=\"gpgsig\"\n> -    fi\n> -    test-tool delete-gpgsig \"$pattern\"\n> +\tlocal delete=\"$1\"\n> +\n> +\tif test \"$delete\" = \"sha256\" ; then\n> +\t\tlocal pattern=\"gpgsig-sha256\"\n> +\telse\n> +\t\tlocal pattern=\"gpgsig\"\n> +\tfi\n> +\ttest-tool delete-gpgsig \"$pattern\"\n>  }\n>\n>\n>  del_sigtag () {\n> -    local storage=\"$1\"\n> -    local delete=\"$2\"\n> -\n> -    if test \"$storage\" = \"$delete\" ; then\n> -\tlocal pattern=\"trailer\"\n> -    elif test \"$storage\" = \"sha256\" ; then\n> -\tlocal pattern=\"gpgsig\"\n> -    else\n> -\tlocal pattern=\"gpgsig-sha256\"\n> -    fi\n> -    test-tool delete-gpgsig \"$pattern\"\n> +\tlocal storage=\"$1\"\n> +\tlocal delete=\"$2\"\n> +\n> +\tif test \"$storage\" = \"$delete\" ; then\n> +\t\tlocal pattern=\"trailer\"\n> +\telif test \"$storage\" = \"sha256\" ; then\n> +\t\tlocal pattern=\"gpgsig\"\n> +\telse\n> +\t\tlocal pattern=\"gpgsig-sha256\"\n> +\tfi\n> +\ttest-tool delete-gpgsig \"$pattern\"\n>  }\n>\n>  base=$(pwd)\n> @@ -146,9 +146,9 @@ do\n>  \t'\n>  \ttest_expect_success \"create a $hash branch\" '\n>  \t\tgit checkout -b branch $(commit_oid $hash) &&\n> -\t\techo \"More more more give me more!\" > more &&\n> +\t\techo \"More more more give me more!\" >more &&\n>  \t\teval more_${hash}_oid=$(git hash-object more) &&\n> -\t\techo \"Another and another and another\" > another &&\n> +\t\techo \"Another and another and another\" >another &&\n>  \t\teval another_${hash}_oid=$(git hash-object another) &&\n>  \t\tgit update-index --add more another &&\n>  \t\tgit commit -m \"Add more files!\" &&\n> @@ -165,15 +165,15 @@ do\n>  \t'\n>  \ttest_expect_success GPG2 \"create additional $hash signed commits\" '\n>  \t\tgit commit --gpg-sign --allow-empty -m \"This is an additional signed\n> commit\" &&\n> -\t\tgit cat-file commit HEAD | del_sigcommit sha256 >\n> \"../${hash}_signedcommit3\" &&\n> -\t\tgit cat-file commit HEAD | del_sigcommit sha1 >\n> \"../${hash}_signedcommit4\" &&\n> +\t\tgit cat-file commit HEAD | del_sigcommit sha256\n> >\"../${hash}_signedcommit3\" &&\n> +\t\tgit cat-file commit HEAD | del_sigcommit sha1\n> >\"../${hash}_signedcommit4\" &&\n>  \t\teval signedcommit3_${hash}_oid=$(git hash-object -t commit -w\n> ../${hash}_signedcommit3) &&\n>  \t\teval signedcommit4_${hash}_oid=$(git hash-object -t commit -w\n> ../${hash}_signedcommit4)\n>  \t'\n>  \ttest_expect_success GPG2 \"create additional $hash signed tags\" '\n>  \t\tgit tag -s -m \"This is an additional signed tag\" signedtag34 HEAD &&\n> -\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha256 >\n> ../${hash}_signedtag3 &&\n> -\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha1 >\n> ../${hash}_signedtag4 &&\n> +\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha256\n> >../${hash}_signedtag3 &&\n> +\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha1\n> >../${hash}_signedtag4 &&\n>  \t\teval signedtag3_${hash}_oid=$(git hash-object -t tag -w\n> ../${hash}_signedtag3) &&\n>  \t\teval signedtag4_${hash}_oid=$(git hash-object -t tag -w\n> ../${hash}_signedtag4)\n>  \t'\n> @@ -181,81 +181,80 @@ done\n>  cd \"$base\"\n>\n>  compare_oids () {\n> -    test \"$#\" = 5 && { local PREREQ=\"$1\"; shift; } || PREREQ=\n> -    local type=\"$1\"\n> -    local name=\"$2\"\n> -    local sha1_oid=\"$3\"\n> -    local sha256_oid=\"$4\"\n> -\n> -    echo ${sha1_oid} > ${name}_sha1_expected\n> -    echo ${sha256_oid} > ${name}_sha256_expected\n> -    echo ${type} > ${name}_type_expected\n> -\n> -    git --git-dir=repo-sha1/.git rev-parse\n> --output-object-format=sha256 ${sha1_oid} > ${name}_sha1_sha256_found\n> -    git --git-dir=repo-sha256/.git rev-parse\n> --output-object-format=sha1 ${sha256_oid} > ${name}_sha256_sha1_found\n> -    local sha1_sha256_oid=\"$(cat ${name}_sha1_sha256_found)\"\n> -    local sha256_sha1_oid=\"$(cat ${name}_sha256_sha1_found)\"\n> -\n> -    test_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n> -\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1\n> ${sha256_oid} > ${name}_sha1 &&\n> -\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n> -'\n> -\n> -    test_expect_success $PREREQ \"Verify ${type} ${name}'s sha256 oid\" '\n> -\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256\n> ${sha1_oid} > ${name}_sha256 &&\n> -\ttest_cmp ${name}_sha256 ${name}_sha256_expected\n> -'\n> +\ttest \"$#\" = 5 && { local PREREQ=\"$1\"; shift; } || PREREQ=\n> +\tlocal type=\"$1\"\n> +\tlocal name=\"$2\"\n> +\tlocal sha1_oid=\"$3\"\n> +\tlocal sha256_oid=\"$4\"\n> +\n> +\techo ${sha1_oid} >${name}_sha1_expected\n> +\techo ${sha256_oid} >${name}_sha256_expected\n> +\techo ${type} >${name}_type_expected\n> +\n> +\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256\n> ${sha1_oid} >${name}_sha1_sha256_found\n> +\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1\n> ${sha256_oid} >${name}_sha256_sha1_found\n> +\tlocal sha1_sha256_oid=\"$(cat ${name}_sha1_sha256_found)\"\n> +\tlocal sha256_sha1_oid=\"$(cat ${name}_sha256_sha1_found)\"\n> +\n> +\ttest_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n> +\t\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1\n> ${sha256_oid} >${name}_sha1 &&\n> +\t\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n> +\t'\n>\n> -    test_expect_success $PREREQ \"Verify ${name}'s sha1 type\" '\n> -\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_oid} > ${name}_type1\n> &&\n> -\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_sha1_oid} >\n> ${name}_type2 &&\n> -\ttest_cmp ${name}_type1 ${name}_type2 &&\n> -\ttest_cmp ${name}_type1 ${name}_type_expected\n> -'\n> +\ttest_expect_success $PREREQ \"Verify ${type} ${name}'s sha256 oid\" '\n> +\t\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256\n> ${sha1_oid} >${name}_sha256 &&\n> +\t\ttest_cmp ${name}_sha256 ${name}_sha256_expected\n> +\t'\n>\n> -    test_expect_success $PREREQ \"Verify ${name}'s sha256 type\" '\n> -\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_oid} >\n> ${name}_type3 &&\n> -\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_sha256_oid} >\n> ${name}_type4 &&\n> -\ttest_cmp ${name}_type3 ${name}_type4 &&\n> -\ttest_cmp ${name}_type3 ${name}_type_expected\n> -'\n> +\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 type\" '\n> +\t\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_oid} >${name}_type1\n> &&\n> +\t\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_sha1_oid}\n> >${name}_type2 &&\n> +\t\ttest_cmp ${name}_type1 ${name}_type2 &&\n> +\t\ttest_cmp ${name}_type1 ${name}_type_expected\n> +\t'\n>\n> -    test_expect_success $PREREQ \"Verify ${name}'s sha1 size\" '\n> -\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_oid} > ${name}_size1\n> &&\n> -\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_sha1_oid} >\n> ${name}_size2 &&\n> -\ttest_cmp ${name}_size1 ${name}_size2\n> -'\n> +\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 type\" '\n> +\t\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_oid}\n> >${name}_type3 &&\n> +\t\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_sha256_oid}\n> >${name}_type4 &&\n> +\t\ttest_cmp ${name}_type3 ${name}_type4 &&\n> +\t\ttest_cmp ${name}_type3 ${name}_type_expected\n> +\t'\n>\n> -    test_expect_success $PREREQ \"Verify ${name}'s sha256 size\" '\n> -\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_oid} >\n> ${name}_size3 &&\n> -\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_sha256_oid} >\n> ${name}_size4 &&\n> -\ttest_cmp ${name}_size3 ${name}_size4\n> -'\n> +\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 size\" '\n> +\t\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_oid} >${name}_size1\n> &&\n> +\t\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_sha1_oid}\n> >${name}_size2 &&\n> +\t\ttest_cmp ${name}_size1 ${name}_size2\n> +\t'\n>\n> -    test_expect_success $PREREQ \"Verify ${name}'s sha1 pretty content\"\n> '\n> -\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_oid} >\n> ${name}_content1 &&\n> -\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_sha1_oid} >\n> ${name}_content2 &&\n> -\ttest_cmp ${name}_content1 ${name}_content2\n> -'\n> +\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 size\" '\n> +\t\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_oid}\n> >${name}_size3 &&\n> +\t\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_sha256_oid}\n> >${name}_size4 &&\n> +\t\ttest_cmp ${name}_size3 ${name}_size4\n> +\t'\n>\n> -    test_expect_success $PREREQ \"Verify ${name}'s sha256 pretty\n> content\" '\n> -\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_oid} >\n> ${name}_content3 &&\n> -\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_sha256_oid} >\n> ${name}_content4 &&\n> -\ttest_cmp ${name}_content3 ${name}_content4\n> -'\n> +\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 pretty content\" '\n> +\t\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_oid}\n> >${name}_content1 &&\n> +\t\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_sha1_oid}\n> >${name}_content2 &&\n> +\t\ttest_cmp ${name}_content1 ${name}_content2\n> +\t'\n>\n> -    test_expect_success $PREREQ \"Verify ${name}'s sha1 content\" '\n> -\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_oid} >\n> ${name}_content5 &&\n> -\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_sha1_oid} >\n> ${name}_content6 &&\n> -\ttest_cmp ${name}_content5 ${name}_content6\n> -'\n> +\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 pretty content\" '\n> +\t\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_oid}\n> >${name}_content3 &&\n> +\t\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_sha256_oid}\n> >${name}_content4 &&\n> +\t\ttest_cmp ${name}_content3 ${name}_content4\n> +\t'\n>\n> -    test_expect_success $PREREQ \"Verify ${name}'s sha256 content\" '\n> -\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_oid} >\n> ${name}_content7 &&\n> -\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_sha256_oid} >\n> ${name}_content8 &&\n> -\ttest_cmp ${name}_content7 ${name}_content8\n> -'\n> +\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 content\" '\n> +\t\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_oid}\n> >${name}_content5 &&\n> +\t\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_sha1_oid}\n> >${name}_content6 &&\n> +\t\ttest_cmp ${name}_content5 ${name}_content6\n> +\t'\n\nEverything up to here looks like whitespace changes.  Indeed.\n\n>\n> +\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 content\" '\n> +\t\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_oid}\n> >${name}_content7 &&\n> +\t\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_sha256_oid}\n> >${name}_content8 &&\n> +\t\ttest_cmp ${name}_content7 ${name}_content8\n> +\t'\n>  }\n\nBut this is diffed as an addition.  Seems like either a mistake or the\ncommit message and/or patch comment (`---`) didn’t mention this kind of\nchange.\n\n>\n>  compare_oids 'blob' hello \"$hello_sha1_oid\" \"$hello_sha256_oid\"\n> --\n> 2.47.0.170.g23d289d273.dirty\n"},{"id":"506491","messageId":"xmqqikt5xckk.fsf@gitster.g","threadId":"62440","inReplyTo":"2a385fcd-7cb2-4d6c-8372-2139f11c85a8@app.fastmail.com","subject":"Re: [PATCH] t1016: clean up style","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-11-03T02:42:35Z","receivedAt":"2024-11-03T02:42:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n\n> Hi\n>\n> This looks correct according to CodingGuidelines, part “For shell\n> scripts”.\n>\n> • Whitespace and redirect operator\n> • Case arms indentation\n> • Tabs for indentation.  It might look like some of the lines in the\n>   preimage (term?) use two nesting levels set to four columns, but that\n>   is because the first line is indented by four spaces and the next line\n>   is indented with one tab (eight columns).  The postimage changes them\n>   to use one tab per level.\n\nThanks for an easy-to-follow-concise-and-to-the-point review\nsummary.  Very much appreciated.\n\n>\n> On Sat, Nov 2, 2024, at 17:53, Andrew Kreimer wrote:\n>> Remove whitespace after redirect operator.\n>>\n>> Align mixed space/tab usages.\n>>\n>> Signed-off-by: Andrew Kreimer <algonell@gmail.com>\n>> ...\n>> +\t\ttest_cmp ${name}_content5 ${name}_content6\n>> +\t'\n>\n> Everything up to here looks like whitespace changes.  Indeed.\n\n\n\n>> +\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 content\" '\n>> +\t\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_oid}\n>> >${name}_content7 &&\n>> +\t\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_sha256_oid}\n>> >${name}_content8 &&\n>> +\t\ttest_cmp ${name}_content7 ${name}_content8\n>> +\t'\n>>  }\n>\n> But this is diffed as an addition.  Seems like either a mistake or the\n> commit message and/or patch comment (`---`) didn’t mention this kind of\n> change.\n\nGood eyes.  I suspect that it is from a separate topic, and this\npatch is supposed to be preliminary clean-up for this change, or\nsomething?\n\n"},{"id":"506492","messageId":"Zyd_ToxE-KVYSwHl@void.void","threadId":"62440","inReplyTo":"xmqqikt5xckk.fsf@gitster.g","subject":"Re: [PATCH] t1016: clean up style","fromName":"Andrew Kreimer","fromEmail":"algonell@gmail.com","sentAt":"2024-11-03T13:49:02Z","receivedAt":"2024-11-03T13:49:07Z","isPatch":true,"sender":{"key":"algonell@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4669001?v=4"},"body":"On Sat, Nov 02, 2024 at 07:42:35PM -0700, Junio C Hamano wrote:\n> Good eyes.  I suspect that it is from a separate topic, and this\n> patch is supposed to be preliminary clean-up for this change, or\n> something?\n\nI did all of the clean ups again from scratch, the resulting patch\nfiles are almost the same.\n\nBy eyeballig the instaweb, it seems that the chunks are interleaved\nfar apart, and not side by side as usual.\n\nWill send v2 anyway with improved message body and an extra line to\nbe removed, thank you both.\n"},{"id":"506493","messageId":"20241103135111.13508-1-algonell@gmail.com","threadId":"62440","inReplyTo":"20241102165534.17112-1-algonell@gmail.com","subject":"[PATCH v2] t1016: clean up style","fromName":"Andrew Kreimer","fromEmail":"algonell@gmail.com","sentAt":"2024-11-03T13:50:42Z","receivedAt":"2024-11-03T13:51:21Z","isPatch":true,"sender":{"key":"algonell@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4669001?v=4"},"body":"Adhere to Documentation/CodingGuidelines:\n  - Whitespace and redirect operator.\n  - Case arms indentation.\n  - Tabs for indentation.\n\nSigned-off-by: Andrew Kreimer <algonell@gmail.com>\n---\nv2:\n  - Base on: \"The seventh batch\".\n  - Remove the extra line in between functions.\n  - Elaborate on the changes (thank you, Kristoffer).\n\n t/t1016-compatObjectFormat.sh | 262 +++++++++++++++++-----------------\n 1 file changed, 130 insertions(+), 132 deletions(-)\n\ndiff --git a/t/t1016-compatObjectFormat.sh b/t/t1016-compatObjectFormat.sh\nindex 8341a2fe83..32e0af392e 100755\n--- a/t/t1016-compatObjectFormat.sh\n+++ b/t/t1016-compatObjectFormat.sh\n@@ -24,84 +24,83 @@ TEST_PASSES_SANITIZE_LEAK=true\n # the commit is identical to the commit in the other repository.\n \n compat_hash () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"sha256\"\n-\t;;\n-    \"sha256\")\n-\techo \"sha1\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"sha256\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"sha1\"\n+\t\t;;\n+\tesac\n }\n \n hello_oid () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"$hello_sha1_oid\"\n-\t;;\n-    \"sha256\")\n-\techo \"$hello_sha256_oid\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"$hello_sha1_oid\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"$hello_sha256_oid\"\n+\t\t;;\n+\tesac\n }\n \n tree_oid () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"$tree_sha1_oid\"\n-\t;;\n-    \"sha256\")\n-\techo \"$tree_sha256_oid\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"$tree_sha1_oid\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"$tree_sha256_oid\"\n+\t\t;;\n+\tesac\n }\n \n commit_oid () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"$commit_sha1_oid\"\n-\t;;\n-    \"sha256\")\n-\techo \"$commit_sha256_oid\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"$commit_sha1_oid\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"$commit_sha256_oid\"\n+\t\t;;\n+\tesac\n }\n \n commit2_oid () {\n-    case \"$1\" in\n-    \"sha1\")\n-\techo \"$commit2_sha1_oid\"\n-\t;;\n-    \"sha256\")\n-\techo \"$commit2_sha256_oid\"\n-\t;;\n-    esac\n+\tcase \"$1\" in\n+\t\"sha1\")\n+\t\techo \"$commit2_sha1_oid\"\n+\t\t;;\n+\t\"sha256\")\n+\t\techo \"$commit2_sha256_oid\"\n+\t\t;;\n+\tesac\n }\n \n del_sigcommit () {\n-    local delete=\"$1\"\n-\n-    if test \"$delete\" = \"sha256\" ; then\n-\tlocal pattern=\"gpgsig-sha256\"\n-    else\n-\tlocal pattern=\"gpgsig\"\n-    fi\n-    test-tool delete-gpgsig \"$pattern\"\n+\tlocal delete=\"$1\"\n+\n+\tif test \"$delete\" = \"sha256\" ; then\n+\t\tlocal pattern=\"gpgsig-sha256\"\n+\telse\n+\t\tlocal pattern=\"gpgsig\"\n+\tfi\n+\ttest-tool delete-gpgsig \"$pattern\"\n }\n \n-\n del_sigtag () {\n-    local storage=\"$1\"\n-    local delete=\"$2\"\n-\n-    if test \"$storage\" = \"$delete\" ; then\n-\tlocal pattern=\"trailer\"\n-    elif test \"$storage\" = \"sha256\" ; then\n-\tlocal pattern=\"gpgsig\"\n-    else\n-\tlocal pattern=\"gpgsig-sha256\"\n-    fi\n-    test-tool delete-gpgsig \"$pattern\"\n+\tlocal storage=\"$1\"\n+\tlocal delete=\"$2\"\n+\n+\tif test \"$storage\" = \"$delete\" ; then\n+\t\tlocal pattern=\"trailer\"\n+\telif test \"$storage\" = \"sha256\" ; then\n+\t\tlocal pattern=\"gpgsig\"\n+\telse\n+\t\tlocal pattern=\"gpgsig-sha256\"\n+\tfi\n+\ttest-tool delete-gpgsig \"$pattern\"\n }\n \n base=$(pwd)\n@@ -146,9 +145,9 @@ do\n \t'\n \ttest_expect_success \"create a $hash branch\" '\n \t\tgit checkout -b branch $(commit_oid $hash) &&\n-\t\techo \"More more more give me more!\" > more &&\n+\t\techo \"More more more give me more!\" >more &&\n \t\teval more_${hash}_oid=$(git hash-object more) &&\n-\t\techo \"Another and another and another\" > another &&\n+\t\techo \"Another and another and another\" >another &&\n \t\teval another_${hash}_oid=$(git hash-object another) &&\n \t\tgit update-index --add more another &&\n \t\tgit commit -m \"Add more files!\" &&\n@@ -165,15 +164,15 @@ do\n \t'\n \ttest_expect_success GPG2 \"create additional $hash signed commits\" '\n \t\tgit commit --gpg-sign --allow-empty -m \"This is an additional signed commit\" &&\n-\t\tgit cat-file commit HEAD | del_sigcommit sha256 > \"../${hash}_signedcommit3\" &&\n-\t\tgit cat-file commit HEAD | del_sigcommit sha1 > \"../${hash}_signedcommit4\" &&\n+\t\tgit cat-file commit HEAD | del_sigcommit sha256 >\"../${hash}_signedcommit3\" &&\n+\t\tgit cat-file commit HEAD | del_sigcommit sha1 >\"../${hash}_signedcommit4\" &&\n \t\teval signedcommit3_${hash}_oid=$(git hash-object -t commit -w ../${hash}_signedcommit3) &&\n \t\teval signedcommit4_${hash}_oid=$(git hash-object -t commit -w ../${hash}_signedcommit4)\n \t'\n \ttest_expect_success GPG2 \"create additional $hash signed tags\" '\n \t\tgit tag -s -m \"This is an additional signed tag\" signedtag34 HEAD &&\n-\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha256 > ../${hash}_signedtag3 &&\n-\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha1 > ../${hash}_signedtag4 &&\n+\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha256 >../${hash}_signedtag3 &&\n+\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha1 >../${hash}_signedtag4 &&\n \t\teval signedtag3_${hash}_oid=$(git hash-object -t tag -w ../${hash}_signedtag3) &&\n \t\teval signedtag4_${hash}_oid=$(git hash-object -t tag -w ../${hash}_signedtag4)\n \t'\n@@ -181,81 +180,80 @@ done\n cd \"$base\"\n \n compare_oids () {\n-    test \"$#\" = 5 && { local PREREQ=\"$1\"; shift; } || PREREQ=\n-    local type=\"$1\"\n-    local name=\"$2\"\n-    local sha1_oid=\"$3\"\n-    local sha256_oid=\"$4\"\n-\n-    echo ${sha1_oid} > ${name}_sha1_expected\n-    echo ${sha256_oid} > ${name}_sha256_expected\n-    echo ${type} > ${name}_type_expected\n-\n-    git --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} > ${name}_sha1_sha256_found\n-    git --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} > ${name}_sha256_sha1_found\n-    local sha1_sha256_oid=\"$(cat ${name}_sha1_sha256_found)\"\n-    local sha256_sha1_oid=\"$(cat ${name}_sha256_sha1_found)\"\n-\n-    test_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n-\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} > ${name}_sha1 &&\n-\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n-'\n-\n-    test_expect_success $PREREQ \"Verify ${type} ${name}'s sha256 oid\" '\n-\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} > ${name}_sha256 &&\n-\ttest_cmp ${name}_sha256 ${name}_sha256_expected\n-'\n+\ttest \"$#\" = 5 && { local PREREQ=\"$1\"; shift; } || PREREQ=\n+\tlocal type=\"$1\"\n+\tlocal name=\"$2\"\n+\tlocal sha1_oid=\"$3\"\n+\tlocal sha256_oid=\"$4\"\n+\n+\techo ${sha1_oid} >${name}_sha1_expected\n+\techo ${sha256_oid} >${name}_sha256_expected\n+\techo ${type} >${name}_type_expected\n+\n+\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} >${name}_sha1_sha256_found\n+\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} >${name}_sha256_sha1_found\n+\tlocal sha1_sha256_oid=\"$(cat ${name}_sha1_sha256_found)\"\n+\tlocal sha256_sha1_oid=\"$(cat ${name}_sha256_sha1_found)\"\n+\n+\ttest_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n+\t\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1 ${sha256_oid} >${name}_sha1 &&\n+\t\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha1 type\" '\n-\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_oid} > ${name}_type1 &&\n-\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_sha1_oid} > ${name}_type2 &&\n-\ttest_cmp ${name}_type1 ${name}_type2 &&\n-\ttest_cmp ${name}_type1 ${name}_type_expected\n-'\n+\ttest_expect_success $PREREQ \"Verify ${type} ${name}'s sha256 oid\" '\n+\t\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256 ${sha1_oid} >${name}_sha256 &&\n+\t\ttest_cmp ${name}_sha256 ${name}_sha256_expected\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha256 type\" '\n-\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_oid} > ${name}_type3 &&\n-\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_sha256_oid} > ${name}_type4 &&\n-\ttest_cmp ${name}_type3 ${name}_type4 &&\n-\ttest_cmp ${name}_type3 ${name}_type_expected\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 type\" '\n+\t\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_oid} >${name}_type1 &&\n+\t\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_sha1_oid} >${name}_type2 &&\n+\t\ttest_cmp ${name}_type1 ${name}_type2 &&\n+\t\ttest_cmp ${name}_type1 ${name}_type_expected\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha1 size\" '\n-\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_oid} > ${name}_size1 &&\n-\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_sha1_oid} > ${name}_size2 &&\n-\ttest_cmp ${name}_size1 ${name}_size2\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 type\" '\n+\t\tgit --git-dir=repo-sha256/.git cat-file -t ${sha256_oid} >${name}_type3 &&\n+\t\tgit --git-dir=repo-sha1/.git cat-file -t ${sha1_sha256_oid} >${name}_type4 &&\n+\t\ttest_cmp ${name}_type3 ${name}_type4 &&\n+\t\ttest_cmp ${name}_type3 ${name}_type_expected\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha256 size\" '\n-\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_oid} > ${name}_size3 &&\n-\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_sha256_oid} > ${name}_size4 &&\n-\ttest_cmp ${name}_size3 ${name}_size4\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 size\" '\n+\t\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_oid} >${name}_size1 &&\n+\t\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_sha1_oid} >${name}_size2 &&\n+\t\ttest_cmp ${name}_size1 ${name}_size2\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha1 pretty content\" '\n-\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_oid} > ${name}_content1 &&\n-\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_sha1_oid} > ${name}_content2 &&\n-\ttest_cmp ${name}_content1 ${name}_content2\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 size\" '\n+\t\tgit --git-dir=repo-sha256/.git cat-file -s ${sha256_oid} >${name}_size3 &&\n+\t\tgit --git-dir=repo-sha1/.git cat-file -s ${sha1_sha256_oid} >${name}_size4 &&\n+\t\ttest_cmp ${name}_size3 ${name}_size4\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha256 pretty content\" '\n-\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_oid} > ${name}_content3 &&\n-\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_sha256_oid} > ${name}_content4 &&\n-\ttest_cmp ${name}_content3 ${name}_content4\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 pretty content\" '\n+\t\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_oid} >${name}_content1 &&\n+\t\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_sha1_oid} >${name}_content2 &&\n+\t\ttest_cmp ${name}_content1 ${name}_content2\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha1 content\" '\n-\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_oid} > ${name}_content5 &&\n-\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_sha1_oid} > ${name}_content6 &&\n-\ttest_cmp ${name}_content5 ${name}_content6\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 pretty content\" '\n+\t\tgit --git-dir=repo-sha256/.git cat-file -p ${sha256_oid} >${name}_content3 &&\n+\t\tgit --git-dir=repo-sha1/.git cat-file -p ${sha1_sha256_oid} >${name}_content4 &&\n+\t\ttest_cmp ${name}_content3 ${name}_content4\n+\t'\n \n-    test_expect_success $PREREQ \"Verify ${name}'s sha256 content\" '\n-\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_oid} > ${name}_content7 &&\n-\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_sha256_oid} > ${name}_content8 &&\n-\ttest_cmp ${name}_content7 ${name}_content8\n-'\n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha1 content\" '\n+\t\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_oid} >${name}_content5 &&\n+\t\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_sha1_oid} >${name}_content6 &&\n+\t\ttest_cmp ${name}_content5 ${name}_content6\n+\t'\n \n+\ttest_expect_success $PREREQ \"Verify ${name}'s sha256 content\" '\n+\t\tgit --git-dir=repo-sha256/.git cat-file ${type} ${sha256_oid} >${name}_content7 &&\n+\t\tgit --git-dir=repo-sha1/.git cat-file ${type} ${sha1_sha256_oid} >${name}_content8 &&\n+\t\ttest_cmp ${name}_content7 ${name}_content8\n+\t'\n }\n \n compare_oids 'blob' hello \"$hello_sha1_oid\" \"$hello_sha256_oid\"\n\nInterdiff against v1:\n  diff --git a/t/t1016-compatObjectFormat.sh b/t/t1016-compatObjectFormat.sh\n  index 06449937a3..32e0af392e 100755\n  --- a/t/t1016-compatObjectFormat.sh\n  +++ b/t/t1016-compatObjectFormat.sh\n  @@ -89,7 +89,6 @@ del_sigcommit () {\n   \ttest-tool delete-gpgsig \"$pattern\"\n   }\n   \n  -\n   del_sigtag () {\n   \tlocal storage=\"$1\"\n   \tlocal delete=\"$2\"\n\nRange-diff against v1:\n1:  d83cddf1d3 ! 1:  e5a1dc0b77 t1016: clean up style\n    @@ Metadata\n      ## Commit message ##\n         t1016: clean up style\n     \n    -    Remove whitespace after redirect operator.\n    -\n    -    Align mixed space/tab usages.\n    +    Adhere to Documentation/CodingGuidelines:\n    +      - Whitespace and redirect operator.\n    +      - Case arms indentation.\n    +      - Tabs for indentation.\n     \n         Signed-off-by: Andrew Kreimer <algonell@gmail.com>\n     \n    @@ t/t1016-compatObjectFormat.sh: TEST_PASSES_SANITIZE_LEAK=true\n     +\ttest-tool delete-gpgsig \"$pattern\"\n      }\n      \n    - \n    +-\n      del_sigtag () {\n     -    local storage=\"$1\"\n     -    local delete=\"$2\"\n-- \n2.47.0.229.g8f8d6eee53\n\n"},{"id":"506498","messageId":"66df52dd-1b7c-4ca8-9752-646b5b223feb@app.fastmail.com","threadId":"62440","inReplyTo":"20241103135111.13508-1-algonell@gmail.com","subject":"Re: [PATCH v2] t1016: clean up style","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-11-03T18:59:08Z","receivedAt":"2024-11-03T18:59:34Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"I can confirm that everything looks correct now.  Like in my reply\nto v1.\n\nhttps://lore.kernel.org/git/20241103135111.13508-1-algonell@gmail.com/T/#m0d6626e6495b978b7116bf1561effe10f6792d24\n\nOn Sun, Nov 3, 2024, at 14:50, Andrew Kreimer wrote:\n> Adhere to Documentation/CodingGuidelines:\n>   - Whitespace and redirect operator.\n>   - Case arms indentation.\n>   - Tabs for indentation.\n>\n> Signed-off-by: Andrew Kreimer <algonell@gmail.com>\n> ---\n> v2:\n>   - Base on: \"The seventh batch\".\n>   - Remove the extra line in between functions.\n>   - Elaborate on the changes (thank you, Kristoffer).\n>\n>  t/t1016-compatObjectFormat.sh | 262 +++++++++++++++++-----------------\n>  1 file changed, 130 insertions(+), 132 deletions(-)\n>\n> diff --git a/t/t1016-compatObjectFormat.sh b/t/t1016-compatObjectFormat.sh\n> index 8341a2fe83..32e0af392e 100755\n> --- a/t/t1016-compatObjectFormat.sh\n> +++ b/t/t1016-compatObjectFormat.sh\n> @@ -24,84 +24,83 @@ TEST_PASSES_SANITIZE_LEAK=true\n>  # the commit is identical to the commit in the other repository.\n>\n>  compat_hash () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"sha256\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"sha1\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"sha256\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"sha1\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  hello_oid () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"$hello_sha1_oid\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"$hello_sha256_oid\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"$hello_sha1_oid\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"$hello_sha256_oid\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  tree_oid () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"$tree_sha1_oid\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"$tree_sha256_oid\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"$tree_sha1_oid\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"$tree_sha256_oid\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  commit_oid () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"$commit_sha1_oid\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"$commit_sha256_oid\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"$commit_sha1_oid\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"$commit_sha256_oid\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  commit2_oid () {\n> -    case \"$1\" in\n> -    \"sha1\")\n> -\techo \"$commit2_sha1_oid\"\n> -\t;;\n> -    \"sha256\")\n> -\techo \"$commit2_sha256_oid\"\n> -\t;;\n> -    esac\n> +\tcase \"$1\" in\n> +\t\"sha1\")\n> +\t\techo \"$commit2_sha1_oid\"\n> +\t\t;;\n> +\t\"sha256\")\n> +\t\techo \"$commit2_sha256_oid\"\n> +\t\t;;\n> +\tesac\n>  }\n>\n>  del_sigcommit () {\n> -    local delete=\"$1\"\n> -\n> -    if test \"$delete\" = \"sha256\" ; then\n> -\tlocal pattern=\"gpgsig-sha256\"\n> -    else\n> -\tlocal pattern=\"gpgsig\"\n> -    fi\n> -    test-tool delete-gpgsig \"$pattern\"\n> +\tlocal delete=\"$1\"\n> +\n> +\tif test \"$delete\" = \"sha256\" ; then\n> +\t\tlocal pattern=\"gpgsig-sha256\"\n> +\telse\n> +\t\tlocal pattern=\"gpgsig\"\n> +\tfi\n> +\ttest-tool delete-gpgsig \"$pattern\"\n>  }\n>\n> -\n>  del_sigtag () {\n> -    local storage=\"$1\"\n> -    local delete=\"$2\"\n> -\n> -    if test \"$storage\" = \"$delete\" ; then\n> -\tlocal pattern=\"trailer\"\n> -    elif test \"$storage\" = \"sha256\" ; then\n> -\tlocal pattern=\"gpgsig\"\n> -    else\n> -\tlocal pattern=\"gpgsig-sha256\"\n> -    fi\n> -    test-tool delete-gpgsig \"$pattern\"\n> +\tlocal storage=\"$1\"\n> +\tlocal delete=\"$2\"\n> +\n> +\tif test \"$storage\" = \"$delete\" ; then\n> +\t\tlocal pattern=\"trailer\"\n> +\telif test \"$storage\" = \"sha256\" ; then\n> +\t\tlocal pattern=\"gpgsig\"\n> +\telse\n> +\t\tlocal pattern=\"gpgsig-sha256\"\n> +\tfi\n> +\ttest-tool delete-gpgsig \"$pattern\"\n>  }\n>\n>  base=$(pwd)\n> @@ -146,9 +145,9 @@ do\n>  \t'\n>  \ttest_expect_success \"create a $hash branch\" '\n>  \t\tgit checkout -b branch $(commit_oid $hash) &&\n> -\t\techo \"More more more give me more!\" > more &&\n> +\t\techo \"More more more give me more!\" >more &&\n>  \t\teval more_${hash}_oid=$(git hash-object more) &&\n> -\t\techo \"Another and another and another\" > another &&\n> +\t\techo \"Another and another and another\" >another &&\n>  \t\teval another_${hash}_oid=$(git hash-object another) &&\n>  \t\tgit update-index --add more another &&\n>  \t\tgit commit -m \"Add more files!\" &&\n> @@ -165,15 +164,15 @@ do\n>  \t'\n>  \ttest_expect_success GPG2 \"create additional $hash signed commits\" '\n>  \t\tgit commit --gpg-sign --allow-empty -m \"This is an additional signed\n> commit\" &&\n> -\t\tgit cat-file commit HEAD | del_sigcommit sha256 >\n> \"../${hash}_signedcommit3\" &&\n> -\t\tgit cat-file commit HEAD | del_sigcommit sha1 >\n> \"../${hash}_signedcommit4\" &&\n> +\t\tgit cat-file commit HEAD | del_sigcommit sha256\n> >\"../${hash}_signedcommit3\" &&\n> +\t\tgit cat-file commit HEAD | del_sigcommit sha1\n> >\"../${hash}_signedcommit4\" &&\n>  \t\teval signedcommit3_${hash}_oid=$(git hash-object -t commit -w\n> ../${hash}_signedcommit3) &&\n>  \t\teval signedcommit4_${hash}_oid=$(git hash-object -t commit -w\n> ../${hash}_signedcommit4)\n>  \t'\n>  \ttest_expect_success GPG2 \"create additional $hash signed tags\" '\n>  \t\tgit tag -s -m \"This is an additional signed tag\" signedtag34 HEAD &&\n> -\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha256 >\n> ../${hash}_signedtag3 &&\n> -\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha1 >\n> ../${hash}_signedtag4 &&\n> +\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha256\n> >../${hash}_signedtag3 &&\n> +\t\tgit cat-file tag signedtag34 | del_sigtag \"${hash}\" sha1\n> >../${hash}_signedtag4 &&\n>  \t\teval signedtag3_${hash}_oid=$(git hash-object -t tag -w\n> ../${hash}_signedtag3) &&\n>  \t\teval signedtag4_${hash}_oid=$(git hash-object -t tag -w\n> ../${hash}_signedtag4)\n>  \t'\n> @@ -181,81 +180,80 @@ done\n>  cd \"$base\"\n\nAll changes up to here are straightforward.\n\nAfter this my pager[1] gets confused and `--color-words` becomes useful.\n\n🔗 1: https://github.com/dandavison/delta\n\n>\n>  compare_oids () {\n> -    test \"$#\" = 5 && { local PREREQ=\"$1\"; shift; } || PREREQ=\n> -    local type=\"$1\"\n> -    local name=\"$2\"\n> -    local sha1_oid=\"$3\"\n> -    local sha256_oid=\"$4\"\n> -\n> -    echo ${sha1_oid} > ${name}_sha1_expected\n> -    echo ${sha256_oid} > ${name}_sha256_expected\n> -    echo ${type} > ${name}_type_expected\n> -\n> -    git --git-dir=repo-sha1/.git rev-parse\n> --output-object-format=sha256 ${sha1_oid} > ${name}_sha1_sha256_found\n> -    git --git-dir=repo-sha256/.git rev-parse\n> --output-object-format=sha1 ${sha256_oid} > ${name}_sha256_sha1_found\n> -    local sha1_sha256_oid=\"$(cat ${name}_sha1_sha256_found)\"\n> -    local sha256_sha1_oid=\"$(cat ${name}_sha256_sha1_found)\"\n> -\n> -    test_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n> -\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1\n> ${sha256_oid} > ${name}_sha1 &&\n> -\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n> -'\n> -\n> -    test_expect_success $PREREQ \"Verify ${type} ${name}'s sha256 oid\" '\n\nAt this point the diff gets weird.  There seems to be too many\nwhitespace changes to get a good diff.  But that can be handled (see\nnext part).\n\n> -\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256\n> ${sha1_oid} > ${name}_sha256 &&\n> -\ttest_cmp ${name}_sha256 ${name}_sha256_expected\n> -'\n> +\ttest \"$#\" = 5 && { local PREREQ=\"$1\"; shift; } || PREREQ=\n> +\tlocal type=\"$1\"\n> +\tlocal name=\"$2\"\n> +\tlocal sha1_oid=\"$3\"\n> +\tlocal sha256_oid=\"$4\"\n> +\n> +\techo ${sha1_oid} >${name}_sha1_expected\n> +\techo ${sha256_oid} >${name}_sha256_expected\n> +\techo ${type} >${name}_type_expected\n> +\n> +\tgit --git-dir=repo-sha1/.git rev-parse --output-object-format=sha256\n> ${sha1_oid} >${name}_sha1_sha256_found\n> +\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1\n> ${sha256_oid} >${name}_sha256_sha1_found\n> +\tlocal sha1_sha256_oid=\"$(cat ${name}_sha1_sha256_found)\"\n> +\tlocal sha256_sha1_oid=\"$(cat ${name}_sha256_sha1_found)\"\n> +\n\nIndeed this looks like only indentation and redirection whitespace fixes.\n\n> +\ttest_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n> +\t\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1\n> ${sha256_oid} >${name}_sha1 &&\n> +\t\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n> +\t'\n\nAt this point it _looks like_ some `test_expect_success` are moved\naround.  But my diff deceives me: all of the eight `test_` are provided\nin the same order in the preimage and postimage.\n\nHere I removed the fixes for the trailing `'`, i.e. moved them back to\nthe beginning of the line:\n\n```\n'\n```\n\nAnd that gave me a nice clean diff which again highlighted the\nindentation fixes as well as the redirection operator fixes.\n\nIndeed it all looks correct.\n\n> […]\n"},{"id":"506499","messageId":"xmqqcyjbyjdg.fsf@gitster.g","threadId":"62440","inReplyTo":"66df52dd-1b7c-4ca8-9752-646b5b223feb@app.fastmail.com","subject":"Re: [PATCH v2] t1016: clean up style","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-11-03T23:42:35Z","receivedAt":"2024-11-03T23:42:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n\n>> +\ttest_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n>> +\t\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1\n>> ${sha256_oid} >${name}_sha1 &&\n>> +\t\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n>> +\t'\n>\n> At this point it _looks like_ some `test_expect_success` are moved\n> around.  But my diff deceives me: all of the eight `test_` are provided\n> in the same order in the preimage and postimage.\n\nYes, the output from \"git show --histogram\" seems to match the\ncorresponding blocks in preimage and postimage better in this case.\n\nThanks, both.\n"},{"id":"506504","messageId":"d37b443b-089d-40c3-ad41-f77a990fbc72@app.fastmail.com","threadId":"62440","inReplyTo":"xmqqcyjbyjdg.fsf@gitster.g","subject":"Re: [PATCH v2] t1016: clean up style","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-11-04T09:06:34Z","receivedAt":"2024-11-04T09:06:56Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Mon, Nov 4, 2024, at 00:42, Junio C Hamano wrote:\n> \"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n>\n>>> +\ttest_expect_success $PREREQ \"Verify ${type} ${name}'s sha1 oid\" '\n>>> +\t\tgit --git-dir=repo-sha256/.git rev-parse --output-object-format=sha1\n>>> ${sha256_oid} >${name}_sha1 &&\n>>> +\t\ttest_cmp ${name}_sha1 ${name}_sha1_expected\n>>> +\t'\n>>\n>> At this point it _looks like_ some `test_expect_success` are moved\n>> around.  But my diff deceives me: all of the eight `test_` are provided\n>> in the same order in the preimage and postimage.\n>\n> Yes, the output from \"git show --histogram\" seems to match the\n> corresponding blocks in preimage and postimage better in this case.\n\n…I’ve known about histogram but never tried it.  It does work well in\nthis case.  Noted, thanks. :)\n"}]}