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

Re: Questions about the new

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2009, 21:06 UTC
Message-ID
<7v8wfge2zu.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4AD3619C.6010808@gmail.com>
Sergio Callegari <sergio.callegari@gmail.com> writes:
Show 5 quoted lines
> If I want to replace some commit X by some commit X' I merely need to
> modify the
> parent information of all the commits that are child of X so that they
> pretend
> to be child of X', or am I missing something?

You need to find all the commits that are child of X in the first place. What should happen if your colleague has such a commit in his repository (which you haven't fetched from yet), you enumerated all children of X known to you in your graft file and then you fetch from him? You need to enumerate all children of X again to keep the graft file up to date.

> Thanks for the explanation. Can this be made possible for grafts too?
> Wouldn't it be a matter of having history walkers never obey grafts but
> keep track of them (i.e. of the history of the parenthood they
> reference)?

In the past we discussed the possibility of that for quite a while but never saw a successful implementation. The replace mechanism seemed a cleaner way to do this, and it turned out to be the case.

You are welcome to try doing that for the grafts, of course.
Previous: Sergio CallegariNext: Sergio Callegari
Message 5 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.