From: Derrick Stolee <derrickstolee@github.com>
To: Jack McGuinness via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Cc: Jack McGuinness <jmcguinness2@ucmerced.edu>
Subject: Re: [PATCH] area: /t/t4204-log.sh, partially modernized test script t4202
Date: Mon, 18 Apr 2022 08:16:17 -0400 [thread overview]
Message-ID: <8ec81980-32a4-dbd7-a788-e7f5a012ba09@github.com> (raw)
In-Reply-To: <pull.1218.git.1650096550631.gitgitgadget@gmail.com>
On 4/16/2022 4:09 AM, Jack McGuinness via GitGitGadget wrote:> From: Jack <jmcguinness2@ucmerced.edu>
>
> Remove test body indentations made with spaces, replace with tabs.
This goal has a subtle issue that I'll point out below.
> Remove blank lines at start and end of test bodies.
These are very easy to review.
> test_expect_success 'decorate-refs-exclude with glob' '
> @@ -2037,7 +2016,7 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss
> GNUPGHOME=. git log --graph --show-signature -n1 plain-x509-nokey >actual &&
> grep "^|\\\ merged tag" actual &&
> grep -e "^| | gpgsm: certificate not found" \
> - -e "^| | gpgsm: failed to find the certificate: Not found" actual
In this example, the "\" means that the command is continuing to the next
line. For such continuations, it is OK to use something other than a full
tab, for stylistic reasons.
Specifically here, the "-e" arguments have vertical alignment in the old
version.
Since the leading whitespace here is a tab followed by five spaces, it
would not appear as an error in "git log --check".
(This is all to say, leave this line as-is.)
> test_expect_success 'log --end-of-options' '
> - git update-ref refs/heads/--source HEAD &&
> - git log --end-of-options --source >actual &&
> - git log >expect &&
> - test_cmp expect actual
> + git update-ref refs/heads/--source HEAD &&
> + git log --end-of-options --source >actual &&
> + git log >expect &&
> + test_cmp expect actual
> '
Here, you have issues because you are replacing seven spaces with a tab
PLUS three spaces. While that won't be a complaint in "git log --check",
it is incorrect in this case. It should be a single tab on the left of
these lines.
I feel like maybe you did a find/replace taking four spaces and converting
them to tabs. The real situation is more subtle here.
Thanks,
-Stolee
next prev parent reply other threads:[~2022-04-18 12:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-16 8:09 [PATCH] area: /t/t4204-log.sh, partially modernized test script t4202 Jack McGuinness via GitGitGadget
2022-04-18 12:16 ` Derrick Stolee [this message]
2022-04-20 6:13 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ec81980-32a4-dbd7-a788-e7f5a012ba09@github.com \
--to=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=jmcguinness2@ucmerced.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).