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
Scott Chacon <schacon@gmail.com>
Date
Mar 27, 2010, 12:44 UTC
Message-ID
<d411cc4a1003270544l43f2f93dq5006efb737aa7bbc@mail.gmail.com>
In-Reply-To
<alpine.LFD.2.00.1003262142121.694@xanadu.home>
Hey,
Sorry it's taken me a bit - I'm traveling right now.
On Fri, Mar 26, 2010 at 6:56 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
>> > > Given that GitHub has blessed the world with this corruption,
>> > > we may need to modify JGit to accept it.

Well, shouldn't it accept it just because CGit accepts it? Isn't that an incompatibility in implementation?

>> But GitHub's approach here seems to be "Meh, its fine, don't worry
>> about it".

That isn't really my approach, I actually thought I had fixed this a while ago. It seems to be a pretty understandable mistake, since ls-tree and cat-file -p both output zero padded modes and it is only an issue on trees with subtrees, obviously, so we don't see it all the time at GitHub. I have fixed this and it's in the queue for deployment which should be in the next few days (I gotta get home first).

Show 5 quoted lines
> It's up to GitHub to fork Git then, and while at it stop calling it Git
> compatible.  Really.  If we start to get slack about the pack format
> like this then every Git reimplementation du jour will make similar
> deviations except in different directions and we'll end up with a mess
> to support.

Really? It's not the pack format - we use stock Git servers and almost always have. It's the tree writing when someone edits a file inline - I was writing out zero-padded trees. And, it _is_ Git compatible - CGit only issues a warning, and that only if the circumstances align such that we write a tree with a subtree, which again is pretty rare. There are only a handful of projects like this and in all CGit circumstances makes no practical difference.

> My stance has always been that the C Git is authoritative with regards to
> formats and protocols.  It's up to Github to fix their screw-up.

It is fixed and will be deployed soon, but really, there is no reason to be snippy. It is a simple and minor mistake effecting very few repositories (maybe 100 out of 730k), and the only reason it's an issue at all is that JGit is not following the authoritative CGit implementation of basically ignoring it.

Also, if we're all concerned about "Git reimplementation du jour" deviations, then we need to focus on libifying Git so there isn't a need for such re-implementations. I'm hoping to help with a possible GSoC project on libgit2, but the lack of a linkable library will ensure that re-implementations in nearly every useful language will continue.

Scott
Previous: Avery PennarunNext: Nicolas Pitre
Message 18 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.