git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>,
	Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: "Git List" <git@vger.kernel.org>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Elijah Newren" <newren@gmail.com>,
	"Jon Simons" <jon@jonsimons.org>,
	"Derrick Stolee" <dstolee@microsoft.com>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH v2 2/2] sparse-checkout: document interactions with submodules
Date: Mon, 30 Dec 2019 08:11:57 -0500	[thread overview]
Message-ID: <d934ac0a-d6d7-cf65-5d61-1196abc63ff8@gmail.com> (raw)
In-Reply-To: <CAPig+cTvFW_84TqKsOPjjBM37cX1OL9uX15APcEYpuKVjvM+dg@mail.gmail.com>

On 12/27/2019 3:20 PM, Eric Sunshine wrote:
> On Fri, Dec 27, 2019 at 1:48 PM Derrick Stolee via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
>> diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
>> @@ -340,4 +340,32 @@ test_expect_success 'cone mode: set with core.ignoreCase=true' '
>> +test_expect_success 'interaction with submodules' '
>> +       ...
>> +       cat >expect <<-EOF &&
>> +               a
>> +               folder1
>> +               modules
>> +       EOF
> 
> You would normally use \-EOF rather than -EOF to make it clear that no
> interpolation is needed/expected within the here-doc body. However,
> this script is already full of -EOF when \-EOF ought to be used, so
> being consistent with existing tests may override an objection.
> 
> Likewise, please note for future reference that the usual way
> here-docs are formatted in Git test scripts is to indent the body of
> the here-doc to the same level as the command which opens it. That is:

Thanks for pointing out the difference, except...
 
>     cat >expect <<\-EOF &&

This should be <<-\EOF

>     a
>     folder1
>     modules
>     EOF
> 
> But, again, this script is already full of these malformatted
> here-docs, so maintaining consistency with the existing test in the
> script is probably okay.

Hm. Having these lines have the same tabbing hurts my eyes (it is
harder to see where the contents end, much like if we didn't tab
inside a subshell or an if block).

This is also a place where we are inconsistent, and it's not just
my fault for writing the test script in my own style. Here are a
few scripts that tab the same way as here:

	t0008-ignore.sh
	t4124-apply-ws-rule.sh
	t9400-diff-highlight.sh

These are definitely the minority. I just mention them so anyone
who does a cleanup of this whitespace inconsistency takes the time
to look for all examples.

For now, I'll fix the here-doc interpolation issue for this test,
but keep the whitespace matching the rest of the test script. I'll
add this concern to my next series.

Thanks,
-Stolee

  reply	other threads:[~2019-12-30 13:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-26 20:49 [PATCH 0/1] sparse-checkout: list directories in cone mode Derrick Stolee via GitGitGadget
2019-12-26 20:49 ` [PATCH 1/1] sparse-checkout: list folders " Derrick Stolee via GitGitGadget
2019-12-26 21:17   ` Junio C Hamano
2019-12-27 14:05     ` Derrick Stolee
2019-12-27 15:52   ` Elijah Newren
2019-12-27 18:47 ` [PATCH v2 0/2] sparse-checkout: list directories " Derrick Stolee via GitGitGadget
2019-12-27 18:47   ` [PATCH v2 1/2] sparse-checkout: list folders " Derrick Stolee via GitGitGadget
2019-12-27 21:37     ` Elijah Newren
2019-12-27 18:47   ` [PATCH v2 2/2] sparse-checkout: document interactions with submodules Derrick Stolee via GitGitGadget
2019-12-27 20:20     ` Eric Sunshine
2019-12-30 13:11       ` Derrick Stolee [this message]
2019-12-27 21:46     ` Elijah Newren
2019-12-27 22:33       ` Junio C Hamano
2019-12-30 15:33   ` [PATCH v3 0/2] sparse-checkout: list directories in cone mode Derrick Stolee via GitGitGadget
2019-12-30 15:33     ` [PATCH v3 1/2] " Derrick Stolee via GitGitGadget
2019-12-30 15:33     ` [PATCH v3 2/2] sparse-checkout: document interactions with submodules Derrick Stolee via GitGitGadget
2019-12-30 17:18     ` [PATCH v3 0/2] sparse-checkout: list directories in cone mode Elijah Newren
2019-12-27 21:47 ` [PATCH 0/1] " Elijah Newren

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=d934ac0a-d6d7-cf65-5d61-1196abc63ff8@gmail.com \
    --to=stolee@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=jon@jonsimons.org \
    --cc=newren@gmail.com \
    --cc=sunshine@sunshineco.com \
    --cc=szeder.dev@gmail.com \
    /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).