Skip to content

Commit

Permalink
Merge pull request #3708 from PhilipOakley/die_preserve
Browse files Browse the repository at this point in the history
Update the die() preserve-merges messages to help some users
  • Loading branch information
dscho committed Feb 22, 2022
2 parents bfc55a2 + 1c8a36f commit 158a30d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions builtin/rebase.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
strbuf_reset(&buf);
strbuf_addf(&buf, "%s/rewritten", merge_dir());
if (is_directory(buf.buf)) {
die("`rebase -p` is no longer supported");
die("`rebase --preserve-merges` (-p) is no longer supported.\n"
"You still have a `.git/rebase-merge/rewritten` directory, \n"
"indicating a `rebase preserve-merge` is still in progress.\n");
} else {
strbuf_reset(&buf);
strbuf_addf(&buf, "%s/interactive", merge_dir());
Expand All @@ -1177,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 158a30d

Please sign in to comment.