tags 552121 + upstream retitle 552121 git daemon: "The remote end hung up unexpectedly" is not a useful message thanks
Hi Eugene, Eugene V. Lyubimkin wrote: > $ git push > fatal: The remote end hung up unexpectedly > > Isn't helpful at all and made me think about server's problem. I assume you are using git-daemon on the other end? The git daemon is very simple; see Documentation/technical/pack-protocol.txt Basically it runs one of a number of helpers and dumps its output over the wire. For example, one helper is 'git receive-pack', used to handle push requests. If you run 'git receive-pack' yourself, you can see what output it would provide: $ git receive-pack /nonexistent fatal: '/nonexistent' does not appear to be a git repository This message went to stderr. Similarly, when git cannot write an object file, it writes an appropriate message to stderr. So your request becomes to get ‘git push’ to report what receive-pack wrote to stderr. The relevant code from daemon.c looks like this: memset(&cld, 0, sizeof(cld)); cld.argv = argv; cld.git_cmd = 1; cld.err = -1; if (start_command(&cld)) return -1; close(0); close(1); copy_to_log(cld.err); return finish_command(&cld); That is, it captures stderr from the child and writes it to the daemon’s log. All you have to do is figure out where to send this output instead, and we’ll be done. Ideas welcome. See https://kerneltrap.org/mailarchive/git/2008/10/24/3794834 Hope that helps, Jonathan -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org