Re: [PATCH 4/5] rebase --keep-base: imply --reapply-cherry-picks
From: Philippe Blain <hidden>
Date: 2022-08-25 00:29:34
Hi Phillip, Le 2022-08-15 à 11:11, Phillip Wood via GitGitGadget a écrit :
From: Phillip Wood <redacted> 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 <redacted> Signed-off-by: Phillip Wood <redacted>
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.
quoted hunk ↗ jump to hunk
--- 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.