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

Re: RFC: grafts generalised

From
Stephan Beyer <s-beyer@gmx.net>
Date
Jul 2, 2008, 19:31 UTC
Message-ID
<20080702193157.GA21297@leksak.fem-net>
In-Reply-To
<20080702183701.GE16235@cuci.nl>
Hi,

I'm somehow quite confused about the desired workflow but I try an answer.

Stephen R. van den Berg wrote:
> As far as I understood it, the new git sequencer rewrites history
> proper.  That is timeconsuming by definition, and thus it is *not*
> possible to make a tool based on the sequencer that supports the desired
> iterative-history-rewrite workflow.

If I got the problem right, it is possible. But you have to rewrite and cannot just fake history, of course. And, as Michael wrote:

> The currently planned set of commands would need to be amended, but the
> framework should be in place.

...for example, a "pick <commit>" that just picks the _tree_ of the commit and not the _introduced changes_. (I've never used info/grafts, but if I get the principle right, such tree-picks could realize a linear list of info/grafts history fakes.)

Stephen wrote earlier:
> The problem I encounter is that any number of times I have to "edit"
> history in a non-parameterable fashion, in any of the following ways:
Hm, imho sequencer is well-suited for "non-parameterable" stuff.
> - Change parents.
The "pick" instruction (onto the new parent) is your friend.
> - Add merges.
"merge" instruction ;)
> - Change author, committer, commitdate, authordate.

sequencer doesn't allow to change committer data, but this could be an easy change if you really need that. The same with the author timestamp, that could only be reused from an old commit by using -C option on pick.

> - Change the tree (because of conversion errors in the automated
>   conversion process) belonging to a single commit.
> - Retrofit a patch which has to ripple through all of history until
>   the present.
"pause" instruction, and then do manual changes, then
	git sequencer --continue
Stephan has also written:
> Also, having to run the sequencer to dig 20000 commits into the past,
> then change something, then come back up and rewrite all following
> history and relations (parents/tags/merges) will take a sizeable amount
> of time.

I wonder if grafts can be used in combination with sequencer in such a way that you rewrite foo~20000..foo~19950 and then fake the parents of foo~19949 to be the rewritten once.

> I need something that can be changed at will, then viewed with
> gitk a second later.
You can run gitk whenever you did "pause" in the sequencer file.
[Btw, an integration of sequencer into gitk is also on the TODO list,
 but that's OT here.]
Regards,
  Stephan
-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
Previous: Stephen R. van den BergNext: Stephan Beyer
Message 8 of 36 in “RFC: grafts generalised”
  1. Stephen R. van den BergJul 2, 2008
  2. Jakub NarebskiJul 2, 2008
  3. Michael J GruberJul 2, 2008
  4. Stephen R. van den BergJul 2, 2008
  5. Mike HommeyJul 2, 2008
  6. Michael J GruberJul 2, 2008
  7. Stephen R. van den BergJul 2, 2008
  8. Stephan BeyerJul 2, 2008
  9. Stephan BeyerJul 2, 2008
  10. Dmitry PotapovJul 2, 2008
  11. Stephan BeyerJul 2, 2008
  12. Stephen R. van den BergJul 3, 2008
  13. Andreas EricssonJul 7, 2008
  14. Stephen R. van den BergJul 7, 2008
  15. Stephen R. van den BergJul 2, 2008
  16. Petr BaudisJul 3, 2008
  17. Stephen R. van den BergJul 3, 2008
  18. Jakub NarebskiJul 4, 2008
  19. Dmitry PotapovJul 2, 2008
  20. Dmitry PotapovJul 2, 2008
  21. Stephen R. van den BergJul 2, 2008
  22. Dmitry PotapovJul 2, 2008
  23. Dmitry PotapovJul 2, 2008
  24. Stephen R. van den BergJul 2, 2008
  25. Avery PennarunJul 2, 2008
  26. Junio C HamanoJul 2, 2008
  27. Junio C HamanoJul 2, 2008
  28. Junio C HamanoJul 3, 2008
  29. Johannes SixtJul 3, 2008
  30. Stephen R. van den BergJul 3, 2008
  31. Johannes SixtJul 3, 2008
  32. Stephen R. van den BergJul 3, 2008
  33. Stephen R. van den BergJul 2, 2008
  34. Petr BaudisJul 3, 2008
  35. Petr BaudisJul 3, 2008
  36. Junio C HamanoJul 3, 2008

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.