On Fri, Apr 15, 2022 at 10:33 PM Junio C Hamano <gitster@xxxxxxxxx> 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. Tip: It will probably come out in the shape of a script. We can talk about what to do with it later. > 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. > > I agree that it might not require a full separate command. I'll see if I am able to get it into rebase. Thanks for the feedback.