git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Philip Oakley via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
	Philip Oakley <philipoakley@iee.email>
Subject: [PATCH 1/2] rebase: help user when dying with preserve-merges`
Date: Tue, 22 Feb 2022 10:33:35 +0000	[thread overview]
Message-ID: <cd06aa68c2fc65551cd810a1c2c0941c51433163.1645526016.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1155.git.1645526016.gitgitgadget@gmail.com>

From: Philip Oakley <philipoakley@iee.email>

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 <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 builtin/rebase.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/builtin/rebase.c b/builtin/rebase.c
index d858add3fe8..07221d0ae41 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1181,7 +1181,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());
-- 
gitgitgadget


  reply	other threads:[~2022-02-22 10:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 10:33 [PATCH 0/2] Update the die() preserve-merges messages to help some users Johannes Schindelin via GitGitGadget
2022-02-22 10:33 ` Philip Oakley via GitGitGadget [this message]
2022-02-22 15:32   ` [PATCH 1/2] rebase: help user when dying with preserve-merges` Ævar Arnfjörð Bjarmason
2022-02-22 16:06     ` Philip Oakley
2022-02-23 10:20       ` Ævar Arnfjörð Bjarmason
2022-02-23 17:44         ` Philip Oakley
2022-03-08 13:45           ` Ævar Arnfjörð Bjarmason
2022-02-22 10:33 ` [PATCH 2/2] rebase: `preserve` is also a pull option, tell dying users Philip Oakley via GitGitGadget
2022-02-22 15:34   ` Ævar Arnfjörð Bjarmason
2022-02-22 15:56     ` Philip Oakley
2022-02-22 17:48       ` Philip Oakley
2022-02-23 10:27         ` Ævar Arnfjörð Bjarmason
2022-03-04 14:29           ` Philip Oakley
2022-03-07 16:43             ` Johannes Schindelin
2022-03-07 23:26               ` Philip Oakley
2022-03-09 12:18                 ` Johannes Schindelin
2022-02-22 18:55 ` [PATCH 0/2] Update the die() preserve-merges messages to help some users Phillip Wood
2022-02-22 20:24   ` Philip Oakley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd06aa68c2fc65551cd810a1c2c0941c51433163.1645526016.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=philipoakley@iee.email \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).