Merge branch 'js/rebase-deprecate-preserve-merges'

"git rebase --rebase-merges" replaces its old "--preserve-merges"
option; the latter is now marked as deprecated.

* js/rebase-deprecate-preserve-merges:
  rebase: deprecate --preserve-merges
This commit is contained in:
Junio C Hamano
2019-04-10 02:14:24 +09:00
4 changed files with 24 additions and 19 deletions

View File

@ -1105,8 +1105,8 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
PARSE_OPT_NOARG | PARSE_OPT_NONEG,
parse_opt_interactive },
OPT_SET_INT('p', "preserve-merges", &options.type,
N_("try to recreate merges instead of ignoring "
"them"), REBASE_PRESERVE_MERGES),
N_("(DEPRECATED) try to recreate merges instead of "
"ignoring them"), REBASE_PRESERVE_MERGES),
OPT_BOOL(0, "rerere-autoupdate",
&options.allow_rerere_autoupdate,
N_("allow rerere to update index with resolved "
@ -1217,6 +1217,10 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
usage_with_options(builtin_rebase_usage,
builtin_rebase_options);
if (options.type == REBASE_PRESERVE_MERGES)
warning(_("git rebase --preserve-merges is deprecated. "
"Use --rebase-merges instead."));
if (action != NO_ACTION && !in_progress)
die(_("No rebase in progress?"));
setenv(GIT_REFLOG_ACTION_ENVIRONMENT, "rebase", 0);