Message ID | pull.1323.git.1660576283.gitgitgadget@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | rebase --keep-base: imply --reapply-cherry-picks and --no-fork-point | expand |
Hi Phillip, On Mon, 15 Aug 2022, Phillip Wood via GitGitGadget wrote: > A while a go Philippe reported [1] that he was surprised 'git rebase > --keep-base' removed commits that had been cherry-picked upstream even > though to branch was not being rebased. This has bitten me, too (I did just not get around to reply to Philippe's mail). > I think it is also surprising if '--keep-base' changes the base of the > branch without '--fork-point' being explicitly given on the command > line. This series therefore changes the default behavior of > '--keep-base' to imply '--reapply-cherry-picks' and '--no-fork-point' so > that the base of the branch is unchanged and no commits are removed. In my mind, `--keep-base` should always have adjusted the `<upstream>` to point to the base commit, which is what patch 4/5 does. So I am very much in favor of this patch series. Junio seems to be on top of the code review, so I'll avoid stepping on his toes by adding mine ;-) Ciao, Dscho
"Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes: > A while a go Philippe reported [1] that he was surprised 'git rebase > --keep-base' removed commits that had been cherry-picked upstream even > though to branch was not being rebased. [...] > [1] > https://lore.kernel.org/git/0EA8C067-5805-40A7-857A-55C2633B8570@gmail.com/ In the thread at [1] I said that (in [2]) I expected that --reapply-cherry-picks would be the default, but this implicit --no-reapply-cherry-picks (in order to automatically exclude certain commits) is a long-available and long-advertised feature. So I symphatize with making certain modes of rebase automatically imply --reapply-cherry-picks, but I think that either all modes (as much as possible) should imply it, or no mode should imply it. Having said that, I already looked at the code so I have included my review comments anyway (in case we do decide to have implied --reapply-cherry-picks for --keep-base but not for other cases). As for the --fork-point part, I made a comment in my reply to patch 5. [2] https://lore.kernel.org/git/20200714035104.1465772-1-jonathantanmy@google.com/