Re: [PATCH 4/5] rebase --keep-base: imply --reapply-cherry-picks
- From
Philippe Blain <levraiphilippeblain@gmail.com>
- Date
- Aug 25, 2022, 00:29 UTC
- 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 :
Show 11 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk> > > 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 <levraiphilippeblain@gmail.com> > Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
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.
Show 19 quoted lines
> --- > 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 `<upstream>` and `<branch>`. Running > `git rebase --keep-base <upstream> <branch>` is equivalent to > running > - `git rebase --onto <upstream>...<branch> <upstream> <branch>`. > + `git rebase --reapply-cherry-picks --onto <upstream>...<branch> <upstream> <branch>`. > + > 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.