git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Stephen R. van den Berg" <srb@cuci.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Denis Bueno <dbueno@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: To graft or not to graft... (Re: Recovering from repository corruption)
Date: Wed, 11 Jun 2008 16:34:31 -0700 (PDT)	[thread overview]
Message-ID: <m3ve0fr1fg.fsf@localhost.localdomain> (raw)
In-Reply-To: <20080611232126.GA9054@cuci.nl>

"Stephen R. van den Berg" <srb@cuci.nl> writes:

> This is kind of confusing.
>
> As I understood it from the few shreds of documentation that actually
> mention the grafts file, the grafts file is *not* being cloned.
> Therefore, my assumption was that cloning a repository that has a grafts
> file gives an identical result to cloning the same repository *without*
> the grafts file present.
> 
> As I understand it now, the cloning process actually peeks at the grafts
> file while cloning, and then doesn't copy it.  This results in a rather
> confusingly corrupt clone.
> 
> I suggest two things:
> a. That during the cloning process, the grafts file is completely
>    disregarded in any case at first.
> b. Preferably the grafts file is copied as well (after cloning).  I
>    never really understood why the file is not being copied in the first
>    place (anyone care to explain that?).

A bit of explanation: initially I think grafts were created as a means
to "graft" historical repository (conversion from BitKeeper and from
patches) to current work repository (from when git was deemed suitable
as SCM for Linux kernel development).  Nevertheless the machenism is
generic enough to change history _locally_ in many strange ways (for
example shallow clone uses kind of grafts).

Because graft file can be used to alter history, this totally
_bypases_ the check given by sha1 of commit and cryptographically
signed tags.  It negates security given by sha-1 signing.  That's why
using grafs must be _conscious_ decision - therefore they are purely
local and not propagated.

(Also there were no place for grafts in the "smart" trasport, i.e. git
and ssh protocols.  Thinking about what happens if both sides have
grafs files which differ...)

On the other hand history _without_ grafts might not validate.  I
think that it is why current confusing behavior...

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2008-06-11 23:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 17:26 Recovering from repository corruption Denis Bueno
2008-06-10 17:55 ` Jakub Narebski
2008-06-10 19:38   ` Denis Bueno
2008-06-10 19:59     ` Jakub Narebski
2008-06-10 20:03       ` Denis Bueno
2008-06-10 20:14         ` Jakub Narebski
2008-06-10 20:35           ` Denis Bueno
2008-06-10 20:23         ` Linus Torvalds
2008-06-10 20:28           ` Denis Bueno
2008-06-10 21:09             ` Linus Torvalds
2008-06-10 21:22               ` Denis Bueno
2008-06-10 21:48                 ` Linus Torvalds
2008-06-10 22:09                   ` Denis Bueno
2008-06-10 22:25                     ` Tarmigan
2008-06-10 22:41                       ` Denis Bueno
2008-06-10 22:45                     ` Linus Torvalds
2008-06-10 23:00                       ` Linus Torvalds
2008-06-11  0:43                       ` Nicolas Pitre
2008-06-11  1:39                         ` Linus Torvalds
2008-06-11  1:47                           ` Nicolas Pitre
2008-06-10 21:27               ` Denis Bueno
2008-06-10 22:52               ` Junio C Hamano
2008-06-11 23:21               ` To graft or not to graft... (Re: Recovering from repository corruption) Stephen R. van den Berg
2008-06-11 23:34                 ` Jakub Narebski [this message]
2008-06-11 23:39                 ` Linus Torvalds
2008-06-12  7:14                   ` Johan Herland
2008-06-12  7:47                     ` Jeff King
2008-06-12 10:21                       ` Johan Herland
2008-06-12 12:20                         ` Stephen R. van den Berg
2008-06-10 19:40 ` Recovering from repository corruption Nicolas Pitre
2008-06-10 19:42   ` Denis Bueno

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=m3ve0fr1fg.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=dbueno@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=srb@cuci.nl \
    --cc=torvalds@linux-foundation.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).