git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Questions about the new

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Oct 12, 2009, 19:03 UTC
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
Previous: Christian CouderNext: Jakub Narebski
Message 8 of 9 in “Questions about the new”
  1. SergioOct 12, 2009
  2. David KågedalOct 12, 2009
  3. Johannes SixtOct 12, 2009
  4. Sergio CallegariOct 12, 2009
  5. Junio C HamanoOct 12, 2009
  6. Sergio CallegariOct 13, 2009
  7. Christian CouderOct 12, 2009
  8. Dmitry PotapovOct 12, 2009
  9. Jakub NarebskiOct 13, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.