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

Re: Mark remote `gc --auto` error messages

From
Jeff King <peff@peff.net>
Date
Jun 2, 2016, 21:53 UTC
Message-ID
<20160602215317.GC13356@sigill.intra.peff.net>
In-Reply-To
<CAPc5daXVx1=ptsKJEfEzXbjCNvwYxjAPyp_pob9CeR+Qr3tG_g@mail.gmail.com>
On Thu, Jun 02, 2016 at 01:14:02PM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> > What exactly are you referring to (you only quoted the introduction)?
> > Do you think we should fix the git-gc issue but keep the general
> > behavior of printing messages unaltered? Do you think it would be
> > worthwhile to make server messages distinguishable in general?
> 
> The latter, which I think was what your implementation was attempting to do
> if I read it correctly.

And btw, I don't think this patch fixes the general case. E.g., if receive-pack hits any of its die("BUG") lines, they will not be prefixed. Most clients wouldn't see them, but ssh ones would.

To fix that you'd have to do a whole async process wrapping `receive-pack` that just reads its stdout and stderr and muxes it back over the sideband. But I can think of two roadblocks there:

  - I think the original design of receive-pack was _not_ to share all
    of stderr with the user, because it might contain secret-ish
    server-side things. That's why we have rp_error() which copies to
    the sideband.
    I don't know how useful that is in practice. We copy the stderr
    wholesale from sub-processes like index-pack, so things like file
    paths are likely to get leaked there.
  - the implementation is a bit tricky, because the die() will take
    down the mux thread, too.
-Peff
Previous: Jeff KingNext: Lukas Fleischer
Message 8 of 9 in “Mark remote `gc --auto` error messages”
  1. Lukas FleischerJun 2, 2016
  2. Junio C HamanoJun 2, 2016
  3. Lukas FleischerJun 2, 2016
  4. Junio C HamanoJun 2, 2016
  5. Jeff KingJun 2, 2016
  6. Junio C HamanoJun 2, 2016
  7. Jeff KingJun 2, 2016
  8. Jeff KingJun 2, 2016
  9. receive-pack: send auto-gc output over sideband 2Lukas Fleischer, Jun 5, 2016

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.