From: Junio C Hamano <gitster@pobox.com>
To: "Li Linchao via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Li Linchao" <lilinchao@oschina.cn>
Subject: Re: [PATCH v5] ls-files: update test style
Date: Fri, 01 Jul 2022 14:46:31 -0700 [thread overview]
Message-ID: <xmqqbku87bgo.fsf@gitster.g> (raw)
In-Reply-To: <pull.1269.v5.git.1656673435357.gitgitgadget@gmail.com> (Li Linchao via GitGitGadget's message of "Fri, 01 Jul 2022 11:03:55 +0000")
"Li Linchao via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Li Linchao <lilinchao@oschina.cn>
>
> Update test style in t/t30[*].sh for uniformity, that's to
> keep test title the same line with helper function itself,
> and fix some indentions.
>
> Add a new section "recommended style" in t/README to
> encourage people to use more modern style in test.
>
> Signed-off-by: Li Linchao <lilinchao@oschina.cn>
> ---
> ls-files: update test style
>
> Update test style in t/t30[*].sh for uniformity, that's to keep test
> title the same line with helper function itself.
>
> And update t/README to describe this test style.
>
> Signed-off-by: Li Linchao lilinchao@oschina.cn
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1269%2FCactusinhand%2Fllc%2Ffix-test-title-style-v5
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1269/Cactusinhand/llc/fix-test-title-style-v5
> Pull-Request: https://github.com/gitgitgadget/git/pull/1269
>
> Range-diff vs v4:
>
> 1: d0ee9836f23 ! 1: 6cbb4e5fd49 ls-files: update test style
> @@ t/README: This test harness library does the following things:
> + test_cmp expect actual
> + '
> +
> ++ - Quote or escape the EOF at the head of a here document when
> ++ there is no variable interpolation in it:
> ++
> ++ cmd <<-"EOF"
> ++ literal here-doc text
> ++ EOF
> ++
> ++ Or:
> ++
> ++ cmd <<-\EOF
> ++ literal here-doc text
> ++ EOF
> ++
I do not htink we need to describe two ways to quote at all. If we
absolutely need to have two examples, then:
+ cmd <<-\EOF
+ literal here-doc text
+ EOF
+
+ but not:
+
+ cmd <<-EOF
+ literal here-doc text
+ EOF
but I'd say the lines are better spent to explain what we have this
particular style guide item for.
- Quote or escape the EOF delimiter that begins a here-document if
there is no parameter and other expansion in it, to signal readers
that they can skim it more casually:
cmd <<-\EOF
literal here-document text without any expansion
EOF
or something.
Other than that, this looks really good.
Thanks.
next prev parent reply other threads:[~2022-07-01 21:46 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbku87bgo.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.
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 NNTP newsgroup(s).