Skip to content

Commit 99be4d8

Browse files
committed
rebase: help user when dying with preserve-merges`
Git will die if a "rebase --preserve-merges" is in progress. Users cannot --quit, --abort or --continue the rebase. This sceario can occur if the user updates their Git, or switches to another newer version, after starting a preserve-merges rebase, commonly via the pull setting. One trigger is an unexpectedly difficult to resolve conflict, as reported on the `git-users` group. (https://groups.google.com/g/git-for-windows/c/3jMWbBlXXHM) Tell the user the cause, i.e. the existence of the directory. The problem must be resolved manually, `git rebase --<option>` commands will die, or the user must downgrade. Also, note that the deleted options are no longer shown in the documentation. Signed-off-by: Philip Oakley <[email protected]>
1 parent bfc55a2 commit 99be4d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

builtin/rebase.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
11551155
strbuf_reset(&buf);
11561156
strbuf_addf(&buf, "%s/rewritten", merge_dir());
11571157
if (is_directory(buf.buf)) {
1158-
die("`rebase -p` is no longer supported");
1158+
die("`rebase --preserve-merges` (-p) is no longer supported.\n"
1159+
"You still have a `.git/rebase-merge/rewritten` directory, \n"
1160+
"indicating a `rebase preserve-merge` is still in progress.\n");
11591161
} else {
11601162
strbuf_reset(&buf);
11611163
strbuf_addf(&buf, "%s/interactive", merge_dir());

0 commit comments

Comments
 (0)