Skip to content

Commit 33561f5

Browse files
alexhenriegitster
authored andcommitted
rebase: deprecate --rebase-merges=""
The unusual syntax --rebase-merges="" (that is, --rebase-merges with an empty string argument) has been an undocumented synonym of --rebase-merges without an argument. Deprecate that syntax to avoid confusion when a rebase.rebaseMerges config option is introduced, where rebase.rebaseMerges="" will be equivalent to --no-rebase-merges. It is not likely that anyone is actually using this syntax, but just in case, deprecate the empty string argument instead of dropping support for it immediately. Signed-off-by: Alex Henrie <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7e5dcec commit 33561f5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

builtin/rebase.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
11411141
{OPTION_STRING, 'r', "rebase-merges", &rebase_merges,
11421142
N_("mode"),
11431143
N_("try to rebase merges instead of skipping them"),
1144-
PARSE_OPT_OPTARG, NULL, (intptr_t)""},
1144+
PARSE_OPT_OPTARG, NULL, (intptr_t)"no-rebase-cousins"},
11451145
OPT_BOOL(0, "fork-point", &options.fork_point,
11461146
N_("use 'merge-base --fork-point' to refine upstream")),
11471147
OPT_STRING('s', "strategy", &options.strategy,
@@ -1439,7 +1439,11 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
14391439

14401440
if (rebase_merges) {
14411441
if (!*rebase_merges)
1442-
; /* default mode; do nothing */
1442+
warning(_("--rebase-merges with an empty string "
1443+
"argument is deprecated and will stop "
1444+
"working in a future version of Git. Use "
1445+
"--rebase-merges without an argument "
1446+
"instead, which does the same thing."));
14431447
else if (!strcmp("rebase-cousins", rebase_merges))
14441448
options.rebase_cousins = 1;
14451449
else if (strcmp("no-rebase-cousins", rebase_merges))

0 commit comments

Comments
 (0)