Re: [PATCH v4 1/8] t5504: modernize test by moving heredocs into test bodies
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 31, 2025, 16:26 UTC
- Message-ID
- <xmqqa5b79cgx.fsf@gitster.g>
- In-Reply-To
- <CAPig+cRnm9z06YsCRyTJGqTCF_208BuD+3QoEKqwO7eWTfesAw@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 11 quoted lines
>> @@ -78,6 +72,11 @@ test_expect_success 'push without strict' ' >> + cat >exp <<-EOF && >> + To dst >> + ! refs/heads/main:refs/heads/test [remote rejected] (missing necessary objects) >> + Done >> + EOF > > It's minor, but to make this conform to modern style even more, it > would use `\EOF` rather than `EOF`. > > (Probably not worth a reroll on its own.)
Yup. The rule of thumb is to quote the end-of-heredoc marker when the here-doc does not need interpolation, to serve as a hint to tell the readers that the here-doc is a literal text.