Thread (1 message) 1 message, 1 author, 2023-07-17

Re: [PATCH] Prefer fgetc over fgets where possible

From: Junio C Hamano <hidden>
Date: 2023-07-17 16:52:02

"AtariDreams via GitGitGadget" [off-list ref] writes:
From: Seija Kijin <redacted>

fputc is meant for single characters,
fputs is for strings. We are better off
inserting sole \n characters as
characters, not whole strings.
I do not see if these short lines are deliberate; are they meant to
follow some sort of poetry styles?

In any case, while the above is correct, I do not see the patch
noise is worth it in this particular case.  Yes, if we are writing
code snippets shown with the context in these hunks afresh, please
carefully choose between fputs() and fputc().  But once the code is
written and it is in, it is not worth to go back and fix it, unless
we are fixing surrounding area and doing the clean-up as a "while at
it" change.

By the way, because my mail program warned against an address that
apparently refuses to receive any replies, I had to manually remove
"AtariDreams [off-list ref]" while
composing this message.  I'd appreciate it if you arrange to ensure
that your next patch will not have such addresses on your CC: line.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help