Re: [PATCH 5/5] rebase --keep-base: imply --no-fork-point
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Sep 5, 2022, 13:51 UTC
- Message-ID
- <0a997c9d-d601-637b-9389-9dfd300083cd@gmail.com>
- In-Reply-To
- <20220824221851.1684475-1-jonathantanmy@google.com>
Hi Jonathan
On 24/08/2022 23:18, Jonathan Tan wrote:
Show 15 quoted lines
> "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
>> @@ -1240,6 +1240,12 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
>> die(_("options '%s' and '%s' cannot be used together"), "--keep-base", "--onto");
>> if (options.root)
>> die(_("options '%s' and '%s' cannot be used together"), "--keep-base", "--root");
>> + /*
>> + * --keep-base ignores config.forkPoint as it is confusing if
>> + * the branch base changes when using this option.
>> + */
>> + if (options.fork_point < 0)
>> + options.fork_point = 0;
>
> Hmm..doesn't forkPoint decide the set of commits to be rebased, not the
> point at which the new commits are created? If yes, that doesn't seem to
> have much to do with --keep-base.I think it depends a bit on how you look at it. You're right that --fork-point restricts the set of commits that are rebased, but it also effectively changes the branch base as it removes commits from the branch.
Best Wishes
Phillip