From: Philippe Blain Date: Thu, 25 Aug 2022 00:29:16 GMT Subject: Re: [PATCH 4/5] rebase --keep-base: imply --reapply-cherry-picks Message-ID: <53130a55-8bae-0414-64c2-bb577a1ae02d@gmail.com> In-Reply-To: <9cd4c372ee4b3e5ba45c66a43ad0edaf52f0eed9.1660576283.git.gitgitgadget@gmail.com> Hi Phillip, Le 2022-08-15 à 11:11, Phillip Wood via GitGitGadget a écrit : > From: Phillip Wood > > As --keep-base does not rebase the branch it is confusing if it > removes commits that have been cherry-picked to the upstream branch. > As --reapply-cherry-picks is not supported by the "apply" backend this > commit ensures that cherry-picks are reapplied by forcing the upstream > commit to match the onto commit unless --no-reapply-cherry-picks is > given. > > Reported-by: Philippe Blain > Signed-off-by: Phillip Wood Thanks a lot for picking this up ! I still think that it's a good idea to do that. At least now since 767a4ca648 (sequencer: advise if skipping cherry-picked commit, 2021-08-30) we get a warning, but I think changing the default for '--keep-base' is even better. > --- > Documentation/git-rebase.txt | 2 +- > builtin/rebase.c | 15 ++++++++++++++- > t/t3416-rebase-onto-threedots.sh | 21 +++++++++++++++++++++ > 3 files changed, 36 insertions(+), 2 deletions(-) > > diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt > index 080658c8710..dc0c6c54e27 100644 > --- a/Documentation/git-rebase.txt > +++ b/Documentation/git-rebase.txt > @@ -218,7 +218,7 @@ leave out at most one of A and B, in which case it defaults to HEAD. > merge base of `` and ``. Running > `git rebase --keep-base ` is equivalent to > running > - `git rebase --onto ... `. > + `git rebase --reapply-cherry-picks --onto ... `. > + > This option is useful in the case where one is developing a feature on > top of an upstream branch. While the feature is being worked on, the I think the doc should explicitely mention "This implies `--reapply-cherry-picks`", in addition to your changes. Cheers, Philippe.