Elijah Newren <newren@xxxxxxxxx> writes: > Hi Sergey, > > On Mon, Apr 18, 2022 at 12:30 AM Sergey Organov <sorganov@xxxxxxxxx> wrote: >> >> Elijah Newren <newren@xxxxxxxxx> writes: >> > [...] >> > 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. > > Yes, I mentioned that later in the email, but omitted it in the > summary you highlight here just because the fixed-tree case was so > much more likely to do it. Anyway, sorry for the inaccuracy in the > summarized version. > >> > 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: > > I linked to where I had given another option. > >> https://public-inbox.org/git/87r2oxe3o1.fsf@xxxxxxxxx/ >> >> that at least is safe with respect to user changes. > > If you read the suggestion I made (which I'll reinclude here at [1]), > you'll note that I read the old thread you link to with both your and > Phillips' suggestions. I dug into them with some examples, and came > to the conclusion that we needed something better, as I briefly > commented when proposing my suggested alternative (at [1]). I > appreciate your suggestion and the time you put into it, but based on > my earlier investigation, I believe my suggestion would be a better > way of preserving user changes in merges and I'll be implementing it. > The fact that Martin (in this thread) independently came up with the > same basic idea and implemented it in jj (though he apparently has > some further tweaks around the object model) and it works well > suggests to me that the idea has some real world testing too that > gives me further confidence in the idea. Yep, whoever is going to actually implement something always wins, and that's a good thing. I'm looking forward for the outcome of all this with a hope. Thanks, -- Sergey Organov