git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Improve error message in rebase conflict

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
May 30, 2010, 12:20 UTC
Message-ID
<1275222044-511-1-git-send-email-artagnon@gmail.com>

When the index is unchanged during a rebase conflict resolution, prompt the user to "git add", or alternatively drop the patch using "git rebase --skip".

Noticed-by: Dale Rowley <ddrowley@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 git-am.sh     |    4 +++-
 git-rebase.sh |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/git-am.sh b/git-am.sh
index 87ffae2..3c46f60 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -725,7 +725,9 @@ do
 		# working tree.
 		resolved=
 		git diff-index --quiet --cached HEAD -- && {
-			echo "No changes - did you forget to use 'git add'?"
+			echo "No changes - did you forget to use 'git add'? " \
+				"If you dropped the changes introduced by the patch, " \
+				"you should use \"$cmdline --skip\"."
 			stop_here_user_resolve $this
 		}
 		unmerged=$(git ls-files -u)
diff --git a/git-rebase.sh b/git-rebase.sh
index 44f5c65..60cc0e9 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -217,8 +217,8 @@ do
 			die "No rebase in progress?"
 
 		git diff-files --quiet --ignore-submodules || {
-			echo "You must edit all merge conflicts and then"
-			echo "mark them as resolved using git add"
+			echo "You must edit all merge conflicts and then" \
+			    "mark them as resolved using 'git add'"
 			exit 1
 		}
 		if test -d "$dotest"
-- 
1.7.1
Next: Sverre Rabbelier
Message 1 of 3 in “Improve error message in rebase conflict”
  1. Improve error message in rebase conflictRamkumar Ramachandra, May 30, 2010
  2. Sverre RabbelierMay 30, 2010
  3. Ramkumar RamachandraMay 30, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.