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

Re: [RFC/PATCH 2/2] make remote hangup warnings more friendly

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 4, 2009, 19:04 UTC
Message-ID
<20090304190452.GJ14365@spearce.org>
In-Reply-To
<20090304084245.GB31798@coredump.intra.peff.net>
Jeff King <peff@peff.net> wrote:
Show 12 quoted lines
> When a user asks to do a remote operation but the remote
> side thinks the operation is invalid (e.g., because the user
> pointed to a directory which is not actually a repository),
> then we generally end up showing the user two fatal
> messages: one from the remote explaining what went wrong, and
> one from the local side complaining of an unexpected hangup.
> 
> For example:
> 
>   $ git push /nonexistent master
>   fatal: '/nonexistent' does not appear to be a git repository
>   fatal: The remote end hung up unexpectedly
Show 6 quoted lines
> In this case, the second message is useless noise, and the
> user is better off seeing just the first.
> 
> This patch tries to suppress the "hung up" message when it
> is redundant (but still exits with an error code, of
> course).
Hmm.  It would be nice to clean up these messages, but I
think the better way to do it is...
 
>      I think this would be improved somewhat with stderr processing to:
> 
>        remote: sh: bogus: command not found

... because then we can have positive proof that the remote said something to the user, and we tagged it as being from the remote side, just like we do with progress data in sideband, and then the user can work from that information. Any local side errors are very likely caused by the remote errors, so we shouldn't bother displaying them.

But its a lot more invasive of a patch to setup stderr processing for pipe/SSH.

Actually, the remote stderr processing is desired for more than
just the bad path case.  Its good for when the remote aborts with
a write error from a write_or_die(), at least we know it was on
the remote side and not the local.  Its good for when the remote
shell says a "git-upload-pack: command not found".  Its good for
when the remote hook prints output, the client knows it came from
the remote side and not something local, so its messages should be
read in the context of the remote side.  Etc.
 
-- 
Shawn.
Previous: Jeff KingNext: Jeff King
Message 41 of 43 in “Refactor list of environment variables to be sanitized”
  1. 1/4 Refactor list of environment variables to be sanitizedJunio C Hamano, Mar 1, 2009
  2. 2/4 git-init: inject some sanity to the option parserJunio C Hamano, Mar 1, 2009
  3. 3/4 Add init-serve, the remote side of "git init --remote=host:path"Junio C Hamano, Mar 1, 2009
  4. 4/4 "git init --remote=host:path"Junio C Hamano, Mar 1, 2009
  5. Jeff KingMar 1, 2009
  6. Junio C HamanoMar 1, 2009
  7. Jeff KingMar 1, 2009
  8. Shawn O. PearceMar 1, 2009
  9. Subject: [PATCH] Push to createJunio C Hamano, Mar 3, 2009
  10. Jay SoffianMar 3, 2009
  11. Jeff KingMar 3, 2009
  12. Jay SoffianMar 3, 2009
  13. Jay SoffianMar 3, 2009
  14. Junio C HamanoMar 3, 2009
  15. Jay SoffianMar 3, 2009
  16. Junio C HamanoMar 3, 2009
  17. Junio C HamanoMar 3, 2009
  18. Jay SoffianMar 3, 2009
  19. Jeff KingMar 3, 2009
  20. Jay SoffianMar 3, 2009
  21. Jeff KingMar 4, 2009
  22. Junio C HamanoMar 4, 2009
  23. Jay SoffianMar 4, 2009
  24. Junio C HamanoMar 3, 2009
  25. Jeff KingMar 3, 2009
  26. Junio C HamanoMar 3, 2009
  27. Jeff KingMar 3, 2009
  28. Junio C HamanoMar 3, 2009
  29. Jay SoffianMar 3, 2009
  30. Theodore TsoMar 3, 2009
  31. Johannes SchindelinMar 3, 2009
  32. Theodore TsoMar 4, 2009
  33. Miles BaderMar 6, 2009
  34. Shawn O. PearceMar 3, 2009
  35. 1/2 improve missing repository error messageJeff King, Mar 4, 2009
  36. Matthieu MoyMar 4, 2009
  37. Jeff KingMar 4, 2009
  38. Shawn O. PearceMar 4, 2009
  39. Jeff KingMar 5, 2009
  40. 2/2 make remote hangup warnings more friendlyJeff King, Mar 4, 2009
  41. Shawn O. PearceMar 4, 2009
  42. Jeff KingMar 5, 2009
  43. Daniel BarkalowMar 3, 2009

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.