From: Dmitry Potapov Date: Mon, 12 Oct 2009 19:03:47 GMT Subject: Re: Questions about the new Message-ID: <20091012190347.GA26977@dpotapov.dyndns.org> In-Reply-To: <4AD31EBF.6090307@viscovery.net> On Mon, Oct 12, 2009 at 02:19:11PM +0200, Johannes Sixt wrote: > > With grafts you can only change parenthood; with replace entries you can > change parenthood *and* all other aspects of a commit (message, author, > committer, dates). Actually, you can. I have written a script that did exactly this. It required to modify parents to point to the new commit. The tricky part was that modification could be on top of other modifications, but I was able to handle this case too. Yet, my script was so hackish that I have never dared to share it with someone (and I used it only couple times during CVS to Git conversion). > > Hence, replace entries are more general than grafts. I think both mechanism are theoretically equivalent, but with grafts, it was rather difficult to replace objects (but not impossible!). > The problem with grafts was that, for example, git-pack-objects obeyed the > graft, and could create a broken repository by removing grafted-away > objects. And since git-fsck also obeyed the graft, it did not notice the > breakage. Moreover, grafted-away objects could be removed by the garbage collector... Dmitry