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

Re: Tree with leading '0' modes in 1.7.0.3

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 27, 2010, 19:20 UTC
Message-ID
<20100327192018.GG10910@spearce.org>
In-Reply-To
<7vvdci2vk8.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> 
> > But GitHub's approach here seems to be "Meh, its fine, don't worry
> > about it".
> >
> > Its *NOT* fine.  But Avery and Junio might disagree with me.  :-)
> 
> Did I ever say it is _fine_?  I thought I said "complain loudly".
I apologize if I misrepresented you above.
 
> That would at least give poor jgit users who have hit such a corrupted
> object a chance to get a controlled notice and ask for help (and get an
> insn to recover with filter-branch that appeared in this thread).
Well, there is "complain loudly but do it anyway" and "hard stop".

JGit currently has the leading '0' be a "hard stop". Because this is the fsck code running inside of the receive-pack service, validating what the user sent is isn't malformed. Its clearly malformed.

This only got discovered because Mike tried to take a repository from GitHub and push it into Gerrit Code Review, where JGit's fsck routine cannot be bypassed during receive-pack.

Are you suggesting JGit should change its behavior to be "complain loudly but do it anyway"? I'm open to making the code change there if that is how you think a Git implementation should behave in this case. But I don't want to do it just to match CGit's behavior, sometimes CGit can be wrong. :-)

-- 
Shawn.
Previous: Junio C HamanoNext: Junio C Hamano
Message 32 of 33 in “Tree with leading '0' modes in 1.7.0.3”
  1. Shawn O. PearceMar 26, 2010
  2. Jonathan NiederMar 26, 2010
  3. Shawn O. PearceMar 26, 2010
  4. Jonathan NiederMar 26, 2010
  5. Junio C HamanoMar 26, 2010
  6. Mike.lifeguardMar 26, 2010
  7. Shawn O. PearceMar 26, 2010
  8. Mike.lifeguardMar 26, 2010
  9. Jonathan NiederMar 26, 2010
  10. Junio C HamanoMar 26, 2010
  11. Avery PennarunMar 26, 2010
  12. Mike.lifeguardMar 27, 2010
  13. Shawn O. PearceMar 27, 2010
  14. Nicolas PitreMar 27, 2010
  15. Shawn O. PearceMar 27, 2010
  16. Nicolas PitreMar 27, 2010
  17. Avery PennarunMar 27, 2010
  18. Scott ChaconMar 27, 2010
  19. Nicolas PitreMar 27, 2010
  20. Shawn O. PearceMar 27, 2010
  21. A Large Angry SCMMar 27, 2010
  22. Shawn O. PearceMar 27, 2010
  23. A Large Angry SCMMar 27, 2010
  24. A Large Angry SCMMar 27, 2010
  25. A Large Angry SCMMar 27, 2010
  26. Sitaram ChamartyMar 28, 2010
  27. A Large Angry SCMMar 28, 2010
  28. A Large Angry SCMMar 27, 2010
  29. Junio C HamanoMar 27, 2010
  30. Avery PennarunMar 27, 2010
  31. Junio C HamanoMar 27, 2010
  32. Shawn O. PearceMar 27, 2010
  33. Junio C HamanoMar 27, 2010

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.