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

Re: [RFC] introducing git replay

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 15, 2022, 20:33 UTC
Message-ID
<xmqqbkx2ccj4.fsf@gitster.g>
In-Reply-To
<CAOc6etYvOhqQn3icWj3Ny1m+J_60h7aiqW-gvm=dQyDLgG=6NA@mail.gmail.com>
Edmundo Carmona Antoranz <eantoranz@gmail.com> writes:
> But I am probably wrong in terms of what I understand that you meant.
> Can you expand a little bit, if you don't mind?

What I had in mind is what I have to do every day multiple times. 'master'..'seen' is a series of merges of tips of different topic branches.

                 ---T topic
                     \
       \    \    \    \
  --M---o----o----o----S seen
    ^
    master

Some of the topic branches may get updated and 'master' may gain more commits by merging some topics. Now it is time to update the 'master'..'seen' chain.

                 ---T---P topic (updated)
                     \
       \    \    \    \
  --M---o----o----o----S seen
     \
      o
       \
        N
       master

It would be wonderful if a single command like replay can be used to say "In the old history master..seen I have bunch of merges. master used to be M but now it is at N. Rebuild M..S on top of N _but_ with a bit of twist. Some of the topics in M...S may have been merged to 'master' between M..N and the replayed history on top of N does not want to have a merge from such 'already graduated' topics. Many topics are updated, either by adding a new commit on top or completely rewritten, and we want an updated tip of these topic branches, not the old tip that I merged when I created M..S chain, when replaying the history on top of N."

That kind of operation is quite different from what "rebase" does, and deserves to be under a different name.

Compared to that, "replay exactly the same set of commits in the same shape on top of a different commit whose tree happens to be the same as the original", is a mere special case of "rebase" that is not all that interesting. It may be a worthwhile thing to do to teach "rebase" capable of doing so reliably and more efficiently, but that still falls into "improving rebase" category, not meriting a separate command.

Previous: Edmundo Carmona AntoranzNext: Edmundo Carmona Antoranz
Message 4 of 25 in “[RFC] introducing git replay”
  1. Edmundo Carmona AntoranzApr 13, 2022
  2. Junio C HamanoApr 13, 2022
  3. Edmundo Carmona AntoranzApr 15, 2022
  4. Junio C HamanoApr 15, 2022
  5. Edmundo Carmona AntoranzApr 16, 2022
  6. Junio C HamanoApr 16, 2022
  7. Edmundo Carmona AntoranzApr 16, 2022
  8. Elijah NewrenApr 17, 2022
  9. Edmundo Carmona AntoranzApr 17, 2022
  10. Martin von ZweigbergkApr 17, 2022
  11. Edmundo Carmona AntoranzApr 18, 2022
  12. Sergey OrganovApr 18, 2022
  13. Elijah NewrenApr 18, 2022
  14. Sergey OrganovApr 18, 2022
  15. Tao KlerksApr 20, 2022
  16. Elijah NewrenApr 21, 2022
  17. rsbecker@nexbridge.comApr 13, 2022
  18. Edmundo Carmona AntoranzApr 13, 2022
  19. Edmundo Carmona AntoranzApr 13, 2022
  20. Phillip SusiApr 13, 2022
  21. Edmundo Carmona AntoranzApr 13, 2022
  22. Ævar Arnfjörð BjarmasonApr 13, 2022
  23. Junio C HamanoApr 13, 2022
  24. Edmundo Carmona AntoranzApr 13, 2022
  25. Eric SunshineApr 13, 2022

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.