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

Re: Meaning of "fatal: protocol error: bad line length character"?

From
Junio C Hamano <junkio@cox.net>
Date
Jan 22, 2007, 22:33 UTC
Message-ID
<7vireyr8t3.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<17845.14245.559835.112658@lisa.zopyra.com>
Bill Lear <rael@zopyra.com> writes:
Show 6 quoted lines
> 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.

Previous: Bill LearNext: Han-Wen Nienhuys
Message 14 of 17 in “Meaning of "fatal: protocol error: bad line length character"?”
  1. Bill LearJan 20, 2007
  2. Junio C HamanoJan 20, 2007
  3. Junio C HamanoJan 20, 2007
  4. Bill LearJan 20, 2007
  5. Jakub NarebskiJan 20, 2007
  6. Junio C HamanoJan 20, 2007
  7. Junio C HamanoJan 20, 2007
  8. Shawn O. PearceJan 20, 2007
  9. Junio C HamanoJan 22, 2007
  10. Bill LearJan 22, 2007
  11. Junio C HamanoJan 22, 2007
  12. Bill LearJan 22, 2007
  13. Bill LearJan 22, 2007
  14. Junio C HamanoJan 22, 2007
  15. Han-Wen NienhuysJan 23, 2007
  16. Junio C HamanoJan 23, 2007
  17. Han-Wen NienhuysJan 23, 2007

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.