Re: [PATCH v2 2/2] builtin/am: allow disabling conflict advice
- From
Philippe Blain <levraiphilippeblain@gmail.com>
- Date
- Mar 16, 2024, 19:44 UTC
- Message-ID
- <1961b9dc-e372-b0f9-9185-a1c11d32f1b3@gmail.com>
- In-Reply-To
- <xmqq1q8gsloz.fsf@gitster.g>
Hi Phillip and Junio,
Le 2024-03-11 à 13:49, Junio C Hamano a écrit :
Show 13 quoted lines
> Junio C Hamano <gitster@pobox.com> 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 _ '<xmqq1q8gsloz.fsf@gitster.g>'
Cheers,
Philippe.