git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] http-backend: write newlines to stderr when responding with errors

From
KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>
Date
Jan 12, 2026, 01:47 UTC
Message-ID
<e9c21aba-fa06-4e4f-baf5-f11f13d9ac72@app.fastmail.com>
In-Reply-To
<xmqqpl7govl8.fsf@gitster.g>
On Mon, Jan 12, 2026, at 5:25 AM, Junio C Hamano wrote:
Show 8 quoted lines
> Now another question is which between the callers and these two
> helper functions is responsible to ensure that the message
> terminates with LF.  As these functions can be called only once, I
> think letting them add LF makes sense (if they can be called twice
> or more, we can imagine that a caller may find it useful to make two
> calls to produce a single log entry by ending only the later call
> with LF, but such a use-case clearly cannot be supported with these
> NORETURN functions).  So I think this design makes sense.
Agreed, the code clearly can't log more messages at this point!
> Somehow it feels overly heavyweight to call fprintf() just to send a
> single literal byte to the standard error stream.  putc('\n', stderr)
> perhaps?  The same comment forr the other hunk.

I sent a v2 to fix this (hopefully correctly, I haven't had a whole lot of experience sending patches to mailing lists with git-send-email :/)

Previous: KJ Tsanaktsidis
Message 4 of 4 in “http-backend: write newlines to stderr when responding with errors”
  1. http-backend: write newlines to stderr when responding with errorsKJ Tsanaktsidis, Jan 8, 2026
  2. Junio C HamanoJan 11, 2026
  3. http-backend: write newlines to stderr when responding with errorsKJ Tsanaktsidis, Jan 12, 2026
  4. KJ TsanaktsidisJan 12, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.