Subject: Re: [PATCH v2 2/2] builtin/am: allow disabling conflict advice

From: Philippe Blain <[email-masked]>
Date: Sat, 16 Mar 2024 15:44:49 -0400

Hi Phillip and Junio,

Le 2024-03-11 à 13:49, Junio C Hamano a écrit :
> Junio C Hamano <[email-masked]> writes:
> 
>>> I think you need to append "\n" to the message strings here (and
>>> below) to match the behavior of printf_ln().
>>
>> Good eyes.  You'll get the final "\n" but the line breaks inside the
>> paragraph you give to advise*() functions are your responsibility.
>> Even though advice.c:vadvise() handles multi-line message better
>> (unlike usage.c:vreportf() that is used for error() and die()) by
>> giving a line header for each line of the message, we do not wrap
>> lines at runtime.
> 
> Perhaps something like this.

Thanks Phillip for noticing, and Junio for the fix. I should have looked
at the output, apologies. I made sure that the test passed but since 
t/t4150-am.sh only checks for the "To record the empty patch as an empty commit"
string, it still passed despite the missing newlines.

Just a note if it helps anyone: I cherry-picked Junio's fixes using:

   b4 shazam -P _ '<[email-masked]>'

Cheers,

Philippe.