All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann Dirson <ydirson@altern.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] [BUG] Add a test to check git-prune does not throw away revs hidden by a graft.
Date: Fri, 19 May 2006 22:25:40 +0200	[thread overview]
Message-ID: <20060519202540.GF6535@nowhere.earth> (raw)
In-Reply-To: <Pine.LNX.4.64.0605191159520.10823@g5.osdl.org>

On Fri, May 19, 2006 at 12:02:48PM -0700, Linus Torvalds wrote:
> 
> 
> On Fri, 19 May 2006, Yann Dirson wrote:
> 
> > On Thu, May 18, 2006 at 03:53:36PM -0700, Junio C Hamano wrote:
> > > Yann Dirson <ydirson@altern.org> writes:
> > > 
> > > > To make my point maybe more clear: if someone really wants to make a
> > > > graft permanent, wouldn't some history rewriting ... be the
> > > > way to go,...
> > > 
> > > Yes.
> > 
> > So if temporary usage is a typical use for grafts, don't we want to
> > protect people using them from pruning ?  I got no feedback to my
> > suggestion of changing the default behaviour, even to say it was a bad
> > idea :)
> 
> I don't actually know how much grafts end up being used. Right now, the 
> only really valid use I know about is to graft together the old kernel 
> history kind of thing, and I suspect not a whole lot of people do that (I 
> keep a separate kernel history tree around for when I need to look at it, 
> and it doesn't happen all that often).
> 
> So I think the lack of feedback on the graft-related issue comes directly 
> from that lack of graft usage. 

I take this as an incentive to share my use of the think :)

On several projects managed with CVS, I use a git mirror (maintained
with git-cvsimport for now) to prepare my sets of patches with stgit,
before committing them to cvs (through git-cvsexportcommit).  In this
context, since merges are not recorded in cvs, and cvs insists that
all branches must derive from the trunk, I use grafts to:

	1. record merges
	2. cause git to believe that the trunk derives from the vendor
	   branch
	3. hide those pseudo revisions cvs adds to rcs files saying
	   "file was initially added to branch foo"

It is the latter use which caused the loss previously mentionned.  It
could have been avoided by making cvsimport, or more likely cvsps more
clever wrt this case.


> We _could_ decide that fsck should just follow the "real parents" and the 
> grafts _both_. That's the safe thing to do by default. Possibly with a 
> flag to say "prefer one over the other", or even a "prefer which-ever 
> exists".

I'm not sure I see how "prefer which-ever exists" would be useful - do
you have anything precise in mind ?

Best regards,
-- 
Yann Dirson    <ydirson@altern.org> |
Debian-related: <dirson@debian.org> |   Support Debian GNU/Linux:
                                    |  Freedom, Power, Stability, Gratis
     http://ydirson.free.fr/        | Check <http://www.debian.org/>

  reply	other threads:[~2006-05-19 20:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-18 21:35 [PATCH] [BUG] Add a test to check git-prune does not throw away revs hidden by a graft Yann Dirson
2006-05-18 21:37 ` Linus Torvalds
2006-05-18 21:46   ` Junio C Hamano
2006-05-18 22:01     ` Linus Torvalds
2006-05-18 22:25       ` Junio C Hamano
2006-05-18 22:20     ` Yann Dirson
2006-05-18 22:36       ` Junio C Hamano
2006-05-18 22:52       ` Yann Dirson
2006-05-18 22:53         ` Junio C Hamano
2006-05-19 18:55           ` Yann Dirson
2006-05-19 19:00             ` Jakub Narebski
2006-05-19 19:02             ` Linus Torvalds
2006-05-19 20:25               ` Yann Dirson [this message]
2006-05-19 20:45                 ` Linus Torvalds
2006-05-19 22:22               ` Junio C Hamano
2006-05-19 22:26               ` [PATCH] [BUG] Add a test to check git-prune does not throw awayrevs " David Lang

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=20060519202540.GF6535@nowhere.earth \
    --to=ydirson@altern.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.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 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.