From: Johannes Sixt <J.Sixt@eudaptics.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: grafts+repack+prune = history at danger
Date: Fri, 26 Jan 2007 11:41:12 +0100 [thread overview]
Message-ID: <45B9DAC8.C04C6D3F@eudaptics.com> (raw)
In-Reply-To: 7vmz46ytyy.fsf@assigned-by-dhcp.cox.net
Junio C Hamano wrote:
>
> Johannes Sixt <J.Sixt@eudaptics.com> writes:
>
> > Sure, if I connect my linux repo with a graft to the historical BK tree,
> > then toss the ref that pointed to the historical tree, then git prune:
> > - then currently it won't prune the historical tree
> > - but under my proposal it would. Silly me. Why did I remove that ref?
>
> [...]
>
> Thankfully, the real git does not behave that way. That is why
> fsck/prune _must_ honor grafts. That makes the locally altered
> view consistent. To the altered world view, what are stored in
> the object database do not change, but your view of how they are
> connected does. And if your altered view thinks commit
> v2.6.12-rc2 has one of the commits in the bkcvs history as its
> parent, you do not want to lose that history merely because you
> lost a ref to it -- as long as the commit tagged as v2.6.12-rc2
> is reachable, its (imaginary) parent should be as well.
>From your argument I deduce that grafts are a very important thing (once
they exist in a repo). But the current implementation does not honor
this:
- the grafts file is not part of the objects database
- it is manipulated manually instead of by tools the check for errors
- it is not transferred across clones/pulls/pushes (it's even possible
to create an inconsistent clone)
The way out that I see is to make grafts much, much less important.
Namely that they are obeyed _only_ by tools that _present_ the database
contents. All manipulators must disregard grafts.
Consequently, if I install grafts, I must make sure that I don't prune
away objects that the grafted history needs (i.e. avoid the silliness
mentioned above). If I happen to make the grafted history inconsistent,
I can make it consistent again by removing the grafts file (it was a
local thingy anyway) - no harm done - just the _presentation_ was
altered.
-- Hannes
next prev parent reply other threads:[~2007-01-26 10:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-25 17:17 grafts+repack+prune = history at danger Johannes Sixt
2007-01-25 23:07 ` Junio C Hamano
2007-01-26 8:13 ` Johannes Sixt
2007-01-26 8:54 ` Junio C Hamano
2007-01-26 9:21 ` Johannes Sixt
2007-01-26 9:31 ` Junio C Hamano
2007-01-26 9:48 ` Johannes Sixt
2007-01-26 10:15 ` Junio C Hamano
2007-01-26 10:41 ` Johannes Sixt [this message]
2007-01-26 11:29 ` Junio C Hamano
2007-01-26 13:08 ` Jakub Narebski
2007-01-26 15:55 ` Linus Torvalds
2007-01-26 23:46 ` Junio C Hamano
2007-01-27 0:56 ` Linus Torvalds
2007-01-26 9:15 ` Mark Wooding
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=45B9DAC8.C04C6D3F@eudaptics.com \
--to=j.sixt@eudaptics.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.