Re: Meaning of "fatal: protocol error: bad line length character"?
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:50
Bill Lear [off-list ref] writes:
Looks like it is our developer's fault after all. ... I do think that some augmentation of the error output is in order, either as previously posted, or something fancier. It would be even better if this sort of thing did not trip up git, though perhaps I don't understand enough of how the update hook and git interact.
The updated receive-pack (was fixed with cd83c74c on Dec 30th 2006, has been in 'master', is in 1.5.0-rc2, and will be in 1.5.0) is supposed to make this a non-issue. Is it possible for your developer to use it? You can have a private install of receive-pack somewhere in /home/me/bin and tell git-push to use it with --exec=/home/me/bin/git-receive-pack. With the fixed receive-pack, whatever the mailer says should not break the protocol exchange by leaking into it; instead, it should come back and shown to stderr, just like any output to stderr from the hook script. The test patch I sent you should probably not be used as-is in the production, as it dumps literally everything to your terminal without limit, but I do agree that it helped us diagnose the problem in this case. Maybe limiting it to show the first few hundred bytes would be sufficient for debugging.