From: Junio C Hamano <gitster@pobox.com>
To: lilinchao@oschina.cn
Cc: "Li Linchao via GitGitGadget" <gitgitgadget@gmail.com>,
git <git@vger.kernel.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH v3] ls-files: update test style
Date: Thu, 30 Jun 2022 08:54:25 -0700 [thread overview]
Message-ID: <xmqq1qv6gn9q.fsf@gitster.g> (raw)
In-Reply-To: <2022062915111229306214@oschina.cn> (lilinchao@oschina.cn's message of "Wed, 29 Jun 2022 15:12:13 +0800")
"lilinchao@oschina.cn" <lilinchao@oschina.cn> writes:
>>Mention end of here-document marker should by default be quoted,
>>unless the body needs $variable_interpolation?
> Sorry, I don't get it. I don't see many of ending "EOF" are quoted in our tests.
We encourage to quote the end marker when there is no interpolation
in the here-document, so that ones that do not quote can stand out
and grab attention by developers who are reading the tests, i.e.
cmd <<-EOF
$variable interpolated
EOF
The fact that EOF is not quoted serves as a signal to readers that
they may want to inspect the here-doc text carefully with the
variable interpolation in mind. If the EOF marker is quoted,
cmd <<-\EOF
literal here text
EOF
even if there are many lines in the here-document, the readers may
not have to be so careful---what is used is what they see (modulo
removing the leading indentation tabs).
next prev parent reply other threads:[~2022-06-30 15:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 8:46 [PATCH] ls-files: update test style Li Linchao via GitGitGadget
2022-06-23 10:50 ` Ævar Arnfjörð Bjarmason
2022-06-24 4:57 ` lilinchao
2022-06-23 17:09 ` Junio C Hamano
2022-06-24 5:05 ` lilinchao
2022-06-28 9:14 ` [PATCH v2] " Li Linchao via GitGitGadget
2022-06-28 9:51 ` [PATCH v3] " Li Linchao via GitGitGadget
2022-06-28 20:12 ` Junio C Hamano
2022-06-29 7:12 ` lilinchao
2022-06-30 15:54 ` Junio C Hamano [this message]
2022-06-30 5:59 ` [PATCH v4] " Li Linchao via GitGitGadget
2022-07-01 11:03 ` [PATCH v5] " Li Linchao via GitGitGadget
2022-07-01 21:46 ` Junio C Hamano
2022-07-03 15:49 ` [PATCH v6] " Li Linchao via GitGitGadget
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=xmqq1qv6gn9q.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=lilinchao@oschina.cn \
/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).