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

Re: [RFC] introducing git replay

From
Sergey Organov <sorganov@gmail.com>
Date
Apr 18, 2022, 07:29 UTC
Message-ID
<87lew226iw.fsf@osv.gnss.ru>
In-Reply-To
<CABPp-BE=H-OcvGNJKm2zTvV3jEcUV0L=6W76ctpwOewZg56FKg@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 29 quoted lines
> On Fri, Apr 15, 2022 at 10:41 PM Edmundo Carmona Antoranz
> <eantoranz@gmail.com> wrote:
>>
>> On Fri, Apr 15, 2022 at 10:33 PM Junio C Hamano <gitster@pobox.com> wrote:
>> >
>> > 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.
>> >
>>
>> Let me work a little bit on your workflow to see what I can do.
>
> Replaying merges is something I've put a little thought into, so allow
> me to provide some pointers that may help.  Merges need special
> handling for replaying, and in my opinion, doing either just a new
> merge of the new trees (what rebase --rebase-merges does), or just
> reusing existing trees (what you proposed to start this thread) are
> both suboptimal, though the former is likely to just be annoying and
> require potentially unnecessary user refixing,

It silently drops user changes as well, and that's the worst thing about it, not annoyance.

> whereas the latter can silently discard changes or reintroduce
> discarded changes and could be dangerous. More details on both of
> these...
Please consider yet another option:
https://public-inbox.org/git/87r2oxe3o1.fsf@javad.com/
that at least is safe with respect to user changes.
-- Sergey Organov
Previous: Edmundo Carmona AntoranzNext: Elijah Newren
Message 12 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.