Re: [PATCH v6 2/3] rebase: deprecate --rebase-merges=""
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Mar 7, 2023, 14:59 UTC
- Message-ID
- <af07d899-4e33-e554-2ab9-4226896c695c@dunelm.org.uk>
- In-Reply-To
- <20230305050709.68736-3-alexhenrie24@gmail.com>
Hi Alex
On 05/03/2023 05:07, Alex Henrie wrote:
Show 10 quoted lines
> diff --git a/builtin/rebase.c b/builtin/rebase.c
> index 6635f10d52..c36ddc0050 100644
> --- a/builtin/rebase.c
> +++ b/builtin/rebase.c
> @@ -1140,7 +1140,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
> {OPTION_STRING, 'r', "rebase-merges", &rebase_merges,
> N_("mode"),
> N_("try to rebase merges instead of skipping them"),
> - PARSE_OPT_OPTARG, NULL, (intptr_t)""},
> + PARSE_OPT_OPTARG, NULL, (intptr_t)"no-rebase-cousins"},I've just realized there is a subtle behavior change here. If the user passes "--rebase-merges=rebase-cousins --rebase-merges" we used to rebase cousins but now we wont. The next patch goes back to the old behavior so I don't think we need to worry about it.
Best Wishes
Phillip
Show 16 quoted lines
> OPT_BOOL(0, "fork-point", &options.fork_point,
> N_("use 'merge-base --fork-point' to refine upstream")),
> OPT_STRING('s', "strategy", &options.strategy,
> @@ -1438,7 +1438,11 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
>
> if (rebase_merges) {
> if (!*rebase_merges)
> - ; /* default mode; do nothing */
> + warning(_("--rebase-merges with an empty string "
> + "argument is deprecated and will stop "
> + "working in a future version of Git. Use "
> + "--rebase-merges without an argument "
> + "instead, which does the same thing."));
> else if (!strcmp("rebase-cousins", rebase_merges))
> options.rebase_cousins = 1;
> else if (strcmp("no-rebase-cousins", rebase_merges))