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:48 UTC
Message-ID
<20160602214834.GB13356@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 21 quoted lines
> On Thu, Jun 2, 2016 at 1:06 PM, Lukas Fleischer <lfleischer@lfos.de> wrote:
> > On Thu, 02 Jun 2016 at 21:33:33, Junio C Hamano wrote:
> >> Lukas Fleischer <lfleischer@lfos.de> writes:
> >>
> >> > When running `git push`, it might occur that error messages are
> >> > transferred from the server to the client. While most messages (those
> >> > explicitly sent on sideband 2) are prefixed with "remote:", it seems
> >> > that error messages printed during the automatic householding performed
> >> > by git-gc(1) are displayed without any additional decoration. Thus, such
> >> > messages can easily be misinterpreted as git-gc failing locally, see [1]
> >> > for an actual example of where that happened.
> >>
> >> Sounds like a sensible goal to me.
> >
> > 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.

I think the implementation is doing much more, but it is probably a good thing.

Right now we do not send auto-gc output over the sideband, and its stderr goes to receive-pack's stderr. But that is a different place for different protocols. For git-over-https, it is probably apache's error log, or /dev/null if the server admin configured it. For ssh, it may be back over the ssh stderr channel, or it may go to a log or nowhere if the server admin intercepts receive-pack and redirects it.

So the greater question is not "should this output be marked" but "should auto-gc data go over the sideband so that all clients see it (and any server-side stderr does not)". And I think the answer is probably yes. And that fixes the "remote: " thing as a side effect.

If it were no, then this is not the right solution, and the solution is to swap out copy_to_sideband() for something that copies to stderr with "remote: " prepended, or something.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 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.