Subject: Re: [PATCH 2/3] branch: add test for -m renaming multiple config sections

From: Junio C Hamano <[email-masked]>
Date: Tue, 13 Jun 2017 10:39:34 -0700

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> On Tue, Jun 13, 2017 at 7:10 PM, Junio C Hamano <[email-masked]> wrote:
>> Indenting using <<- would make it easier to read.  I.e.
>>
>>         cat >config.branch <<-\EOF &&
>>         ;; Comment for ...
>>         [branch "source"]
>>                 ;; Comment for ...
>>         ...
>>         EOF
>
> I should have added a comment for that, I can't find any portable (but
> suggestions welcome) way to do that and preserve the indentation, so
> the test_cmp would still succeed if the moving/renaming function
> munged all leading whitespace in the config with -\EOF as opposed to
> \EOF.

Ah, I see why it is done that way.  You could indent the lines in
the configuration file with SPs (<<- strips only HTs, no?)

> It's just a sufficiently large number, I thought -A was portable
> enough after grepping the test suite, but on closer inspection it
> turns out those were all git-grep invocations, oops. Yeah all I need
> here is all lines after a line matching a given string, so that sed
> command works, will fix it up to use that.

Oops, indeed ;-)  Thanks.