{"thread":{"id":"57741","subject":"[PATCH] area: /t/t4204-log.sh, partially modernized test script t4202","startedAt":"2022-04-16T08:09:17Z","lastAt":"2022-04-20T06:13:35Z","messageCount":3,"participants":["Jack McGuinness via GitGitGadget","Derrick Stolee","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"453763","messageId":"pull.1218.git.1650096550631.gitgitgadget@gmail.com","threadId":"57741","inReplyTo":null,"subject":"[PATCH] area: /t/t4204-log.sh, partially modernized test script t4202","fromName":"Jack McGuinness via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-04-16T08:09:10Z","receivedAt":"2022-04-16T08:09:17Z","isPatch":true,"sender":{"key":"jmcguinness2@ucmerced.edu","avatar":null},"body":"From: Jack <jmcguinness2@ucmerced.edu>\n\nRemove test body indentations made with spaces, replace with tabs.\nRemove blank lines at start and end of test bodies.\n\nSigned-off-by: Jack McGuinness <jmcguinness2@ucmerced.edu>\n---\n    [GSoC][PATCH] Applicant Microproject - Modernizing t4202\n    \n    Hi, My name is Jack McGuinness, and a while ago I expressed my interest\n    in git and GSoC. However, due to some personal and academic reasons I\n    haven't been able to work on my micro project since then. I was able to\n    work on my proposal, and I will be finished with it before the\n    submission deadline, but I just want to express my apologies for doing\n    this so late.\n    \n    In my patch, I completed the first four bullet points described in\n    https://lore.kernel.org/git/CAPig+cQpUu2UO-+jWn1nTaDykWnxwuEitzVB7PnW2SS_b7V8Hg@mail.gmail.com/\n    . I will complete the rest of them for t4202 over the rest of today, and\n    submit their respective patches promptly.\n    \n    It has taken a few tries to get submitting my patch wrong due to a\n    plethora of problems, but I think this time it will work.\n    \n    Thanks for your time, Jack.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1218%2FJackMcGu%2Fmaster-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1218/JackMcGu/master-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1218\n\n t/t4202-log.sh | 33 ++++++---------------------------\n 1 file changed, 6 insertions(+), 27 deletions(-)\n\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex be07407f855..6fa9f7500ac 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -49,26 +49,22 @@ test_expect_success setup '\n \n printf \"sixth\\nfifth\\nfourth\\nthird\\nsecond\\ninitial\" > expect\n test_expect_success 'pretty' '\n-\n \tgit log --pretty=\"format:%s\" > actual &&\n \ttest_cmp expect actual\n '\n \n printf \"sixth\\nfifth\\nfourth\\nthird\\nsecond\\ninitial\\n\" > expect\n test_expect_success 'pretty (tformat)' '\n-\n \tgit log --pretty=\"tformat:%s\" > actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'pretty (shortcut)' '\n-\n \tgit log --pretty=\"%s\" > actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'format' '\n-\n \tgit log --format=\"%s\" > actual &&\n \ttest_cmp expect actual\n '\n@@ -83,13 +79,11 @@ cat > expect << EOF\n EOF\n \n test_expect_success 'format %w(11,1,2)' '\n-\n \tgit log -2 --format=\"%w(11,1,2)This is the %s commit.\" > actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'format %w(,1,2)' '\n-\n \tgit log -2 --format=\"%w(,1,2)This is%nthe %s%ncommit.\" > actual &&\n \ttest_cmp expect actual\n '\n@@ -103,47 +97,37 @@ $(git rev-parse --short :/second ) second\n $(git rev-parse --short :/initial) initial\n EOF\n test_expect_success 'oneline' '\n-\n \tgit log --oneline > actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'diff-filter=A' '\n-\n \tgit log --no-renames --pretty=\"format:%s\" --diff-filter=A HEAD > actual &&\n \tgit log --no-renames --pretty=\"format:%s\" --diff-filter A HEAD > actual-separate &&\n \tprintf \"fifth\\nfourth\\nthird\\ninitial\" > expect &&\n \ttest_cmp expect actual &&\n \ttest_cmp expect actual-separate\n-\n '\n \n test_expect_success 'diff-filter=M' '\n-\n \tgit log --pretty=\"format:%s\" --diff-filter=M HEAD >actual &&\n \tprintf \"second\" >expect &&\n \ttest_cmp expect actual\n-\n '\n \n test_expect_success 'diff-filter=D' '\n-\n \tgit log --no-renames --pretty=\"format:%s\" --diff-filter=D HEAD >actual &&\n \tprintf \"sixth\\nthird\" >expect &&\n \ttest_cmp expect actual\n-\n '\n \n test_expect_success 'diff-filter=R' '\n-\n \tgit log -M --pretty=\"format:%s\" --diff-filter=R HEAD >actual &&\n \tprintf \"third\" >expect &&\n \ttest_cmp expect actual\n-\n '\n \n test_expect_success 'multiple --diff-filter bits' '\n-\n \tgit log -M --pretty=\"format:%s\" --diff-filter=R HEAD >expect &&\n \tgit log -M --pretty=\"format:%s\" --diff-filter=Ra HEAD >actual &&\n \ttest_cmp expect actual &&\n@@ -152,19 +136,15 @@ test_expect_success 'multiple --diff-filter bits' '\n \tgit log -M --pretty=\"format:%s\" \\\n \t\t--diff-filter=a --diff-filter=R HEAD >actual &&\n \ttest_cmp expect actual\n-\n '\n \n test_expect_success 'diff-filter=C' '\n-\n \tgit log -C -C --pretty=\"format:%s\" --diff-filter=C HEAD >actual &&\n \tprintf \"fourth\" >expect &&\n \ttest_cmp expect actual\n-\n '\n \n test_expect_success 'git log --follow' '\n-\n \tgit log --follow --pretty=\"format:%s\" ichi >actual &&\n \tprintf \"third\\nsecond\\ninitial\" >expect &&\n \ttest_cmp expect actual\n@@ -820,7 +800,6 @@ test_expect_success 'log.decorate configuration' '\n \ttest_config log.decorate full &&\n \tgit log --pretty=raw >actual &&\n \ttest_cmp expect.raw actual\n-\n '\n \n test_expect_success 'decorate-refs with glob' '\n@@ -879,7 +858,7 @@ test_expect_success 'multiple decorate-refs' '\n \tgit log -n6 --decorate=short --pretty=\"tformat:%f%d\" \\\n \t\t--decorate-refs=\"heads/octopus*\" \\\n \t\t--decorate-refs=\"tags/reach\" >actual &&\n-    test_cmp expect.decorate actual\n+\ttest_cmp expect.decorate actual\n '\n \n test_expect_success 'decorate-refs-exclude with glob' '\n@@ -2037,7 +2016,7 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss\n \tGNUPGHOME=. git log --graph --show-signature -n1 plain-x509-nokey >actual &&\n \tgrep \"^|\\\\\\  merged tag\" actual &&\n \tgrep -e \"^| | gpgsm: certificate not found\" \\\n-\t     -e \"^| | gpgsm: failed to find the certificate: Not found\" actual\n+\t\t -e \"^| | gpgsm: failed to find the certificate: Not found\" actual\n '\n \n test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' '\n@@ -2190,10 +2169,10 @@ test_expect_success 'log --decorate includes all levels of tag annotated tags' '\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+\t   git update-ref refs/heads/--source HEAD &&\n+\t   git log --end-of-options --source >actual &&\n+\t   git log >expect &&\n+\t   test_cmp expect actual\n '\n \n test_expect_success 'set up commits with different authors' '\n\nbase-commit: 4027e30c5395c9c1aeea85e99f51ac62f5148145\n-- \ngitgitgadget\n"},{"id":"453805","messageId":"8ec81980-32a4-dbd7-a788-e7f5a012ba09@github.com","threadId":"57741","inReplyTo":"pull.1218.git.1650096550631.gitgitgadget@gmail.com","subject":"Re: [PATCH] area: /t/t4204-log.sh, partially modernized test script t4202","fromName":"Derrick Stolee","fromEmail":"derrickstolee@github.com","sentAt":"2022-04-18T12:16:17Z","receivedAt":"2022-04-18T12:17:16Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 4/16/2022 4:09 AM, Jack McGuinness via GitGitGadget wrote:> From: Jack <jmcguinness2@ucmerced.edu>\n> \n> Remove test body indentations made with spaces, replace with tabs.\n\nThis goal has a subtle issue that I'll point out below.\n\n> Remove blank lines at start and end of test bodies.\nThese are very easy to review.\n>  test_expect_success 'decorate-refs-exclude with glob' '\n> @@ -2037,7 +2016,7 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss\n>  \tGNUPGHOME=. git log --graph --show-signature -n1 plain-x509-nokey >actual &&\n>  \tgrep \"^|\\\\\\  merged tag\" actual &&\n>  \tgrep -e \"^| | gpgsm: certificate not found\" \\\n> -\t     -e \"^| | gpgsm: failed to find the certificate: Not found\" actual\n\nIn this example, the \"\\\" means that the command is continuing to the next\nline. For such continuations, it is OK to use something other than a full\ntab, for stylistic reasons.\n\nSpecifically here, the \"-e\" arguments have vertical alignment in the old\nversion.\n\nSince the leading whitespace here is a tab followed by five spaces, it\nwould not appear as an error in \"git log --check\".\n\n(This is all to say, leave this line as-is.)\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> +\t   git update-ref refs/heads/--source HEAD &&\n> +\t   git log --end-of-options --source >actual &&\n> +\t   git log >expect &&\n> +\t   test_cmp expect actual\n>  '\n\nHere, you have issues because you are replacing seven spaces with a tab\nPLUS three spaces. While that won't be a complaint in \"git log --check\",\nit is incorrect in this case. It should be a single tab on the left of\nthese lines.\n\nI feel like maybe you did a find/replace taking four spaces and converting\nthem to tabs. The real situation is more subtle here.\n\nThanks,\n-Stolee\n"},{"id":"453952","messageId":"xmqqmtggs2nv.fsf@gitster.g","threadId":"57741","inReplyTo":"pull.1218.git.1650096550631.gitgitgadget@gmail.com","subject":"Re: [PATCH] area: /t/t4204-log.sh, partially modernized test script t4202","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-04-20T06:13:24Z","receivedAt":"2022-04-20T06:13:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Jack McGuinness via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Jack <jmcguinness2@ucmerced.edu>\n> Subject: Re: [PATCH] area: /t/t4204-log.sh, partially modernized test script t4202\n\nI am not sure what \"area\" in this context is.  Do not report what\nyou did in past tense on the title.\n\nPerhaps\n\n    Subject: [PATCH] t4202: modernize code layout\n\nor something?\n\n> Remove test body indentations made with spaces, replace with tabs.\n> Remove blank lines at start and end of test bodies.\n\nOK.  The title says \"partially\", strongly hinting that the script is\nnot fully modern even if we take this patch.  There should be some\nmention of left-over work that is left to a later occasion here.\n\nThanks.\n"}]}