Thread (1 message) 1 message, 1 author, 2026-02-25

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

From: Junio C Hamano <hidden>
Date: 2026-02-25 00:29:46

Mirko Faina [off-list ref] writes:
quoted
quoted
+		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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help