Subject: Re: [PATCH v2 1/2] format-patch: add ability to use alt cover format

From: Junio C Hamano <[email-masked]>
Date: Tue, 24 Feb 2026 16:29:41 -0800

Mirko Faina <[email-masked]> writes:

>> > +		fprintf(cover_file, "%s\n", commit_line.buf);
>> 
>> I somehow would have expected that as we internally prepare "format"
>> string given to this function , we ensure it ends with "\n" so we do
>> not have to do a fprintf() here.
>
> The value of format is user defined, I'm not doing any pre proccessing
> to it apart from stripping the prefix. Would it be much different had I
> appended a newline here? I personally think it's fine doing a fprintf
> here.

I thought you are stripping the prefix and making a copy in the
configuration parser.  I didn't look closely but I thought it would
be trivially cheap to also append LF there.  If not, I agree with
you that it is not a huge deal to do the "%s\n" here instead.

Thanks for working on this topic.