From: Nicolas Pitre <nico@fluxnic.net>
To: Scott Chacon <schacon@gmail.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
"Mike.lifeguard" <mike.lifeguard@gmail.com>,
Avery Pennarun <apenwarr@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Jonathan Nieder <jrnieder@gmail.com>, git <git@vger.kernel.org>
Subject: Re: Tree with leading '0' modes in 1.7.0.3
Date: Sat, 27 Mar 2010 10:21:30 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.1003270959110.694@xanadu.home> (raw)
In-Reply-To: <d411cc4a1003270544l43f2f93dq5006efb737aa7bbc@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 3481 bytes --]
On Sat, 27 Mar 2010, Scott Chacon wrote:
> 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?
CGit fsck complains about it. This should be sufficient a clue to
avoid such things.
> >> 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).
Thanks.
> > 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.
It is still damn important to those with an interest in pack format
improvements that only one way of creating a tree object exists,
especially as we stamp a SHA1 hash on it. Whatever we do with the tree
encoding in the future, it is essential that the canonical expression of
any tree object be unambiguous and always produce the same hash.
> > 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.
But again CGit's fsck is not ignoring this discrepancy. And if the CGit
core is otherwise silently accepting it then it is a mistake.
> 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.
Don't get me wrong. I'm not against Git reimplementations per se, as
long as they rigorously implement the exact format and protocol from
CGit. In that sense it is important that the CGit fsck and verify-pack
tools be exploited on objects/packs produced by alternate Git
implementation systematically to find such issues.
Nicolas
next prev parent reply other threads:[~2010-03-27 14:21 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 21:56 Tree with leading '0' modes in 1.7.0.3 Shawn O. Pearce
2010-03-26 22:26 ` Jonathan Nieder
2010-03-26 22:29 ` Shawn O. Pearce
2010-03-26 22:40 ` Jonathan Nieder
2010-03-26 23:09 ` Junio C Hamano
2010-03-26 22:59 ` Mike.lifeguard
2010-03-26 23:05 ` Shawn O. Pearce
2010-03-26 23:22 ` Mike.lifeguard
2010-03-26 23:49 ` Jonathan Nieder
2010-03-26 23:50 ` Junio C Hamano
2010-03-26 23:56 ` Avery Pennarun
2010-03-27 0:00 ` Mike.lifeguard
2010-03-27 1:22 ` Shawn O. Pearce
2010-03-27 1:30 ` Nicolas Pitre
2010-03-27 1:34 ` Shawn O. Pearce
2010-03-27 1:56 ` Nicolas Pitre
2010-03-27 2:33 ` Avery Pennarun
2010-03-27 12:44 ` Scott Chacon
2010-03-27 14:21 ` Nicolas Pitre [this message]
2010-03-27 19:14 ` Shawn O. Pearce
2010-03-27 19:30 ` A Large Angry SCM
2010-03-27 19:32 ` Shawn O. Pearce
2010-03-27 19:39 ` A Large Angry SCM
2010-03-27 19:44 ` A Large Angry SCM
2010-03-27 19:57 ` A Large Angry SCM
2010-03-28 17:38 ` Sitaram Chamarty
2010-03-28 23:28 ` A Large Angry SCM
2010-03-27 20:13 ` A Large Angry SCM
2010-03-27 20:16 ` Junio C Hamano
2010-03-27 22:16 ` Avery Pennarun
2010-03-27 5:16 ` Junio C Hamano
2010-03-27 19:20 ` Shawn O. Pearce
2010-03-27 20:04 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1003270959110.694@xanadu.home \
--to=nico@fluxnic.net \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=mike.lifeguard@gmail.com \
--cc=schacon@gmail.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).