From: Phillip Wood Date: Tue, 07 Mar 2023 14:59:09 GMT Subject: Re: [PATCH v6 2/3] rebase: deprecate --rebase-merges="" Message-ID: In-Reply-To: <20230305050709.68736-3-alexhenrie24@gmail.com> Hi Alex On 05/03/2023 05:07, Alex Henrie wrote: > 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 > 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))