Subject: Re: [PATCH v2 3/4] t4113: use "<<-" instead of "<<"

From: Junio C Hamano <[email-masked]>
Date: Thu, 02 Feb 2023 13:05:05 -0800

Shuqi Liang <[email-masked]> writes:

> use "<<-" instead of "<<"

You forgot to explain "Why?".  What you did, anybody can see in the
patch text.  Why you did so is what you are expected to explain in
your proposed log message.

> -cat >test-patch <<\EOF
> +cat >test-patch <<-\EOF
>  diff --git a/file b/file
>  --- a/file
>  +++ b/file

There is no need to do this, as the body of the here-doc is not
indented/prefixed with HT at all. 

> @@ -31,7 +31,7 @@ test_expect_success 'apply at the end' '
>  '
>  
>  test_expect_success 'setup for apply at the beginning' '
> -	cat >test-patch <<\EOF
> +	cat >test-patch <<-\EOF
>  	diff a/file b/file
>  	--- a/file
>  	+++ b/file

This is necessary but that is only because [PATCH v2 2/4] broke it.
In general, we frown upon a series where a bug is introduced in an
earlier step, with another patch fixing that bug.  

Let's not introduce such a bug that we need to fix later from the
beginning instead.

Thanks.