Re: [PATCH 2/3] branch: add test for -m renaming multiple config sections
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 13, 2017, 17:39 UTC
- Message-ID
- <xmqq7f0f7pnt.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CACBZZX5e1cGKeHZhA1vWebdZek=a+TdYzXc5GuXaDi8SpL1YXw@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 15 quoted lines
> On Tue, Jun 13, 2017 at 7:10 PM, Junio C Hamano <gitster@pobox.com> 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?)
Show 5 quoted lines
> 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.