Skip to content

Commit

Permalink
rebase: preserve is also a pull option, tell dying users
Browse files Browse the repository at this point in the history
The `--preserve-merges` option was removed by v2.35.0. However
users may not be aware that it is also a Pull option, and it is
still offered by major IDE vendors such as Visual Studio.

Extend the `--preserve-merges` die message to direct users to
this option and it's locations.

Signed-off-by: Philip Oakley <[email protected]>
  • Loading branch information
PhilipOakley committed Feb 21, 2022
1 parent 99be4d8 commit 1c8a36f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion builtin/rebase.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,10 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
builtin_rebase_usage, 0);

if (preserve_merges_selected)
die(_("--preserve-merges was replaced by --rebase-merges"));
die(_("--preserve-merges was replaced by --rebase-merges\n"
"Also, check your `pull` configuration settings\n"
"`git config --show-scope --show-origin --get-regexp 'pull.*'`\n"
"which may also invoke this option."));

if (action != ACTION_NONE && total_argc != 2) {
usage_with_options(builtin_rebase_usage,
Expand Down

0 comments on commit 1c8a36f

Please sign in to comment.