git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>
Cc: Dale Rowley <ddrowley@gmail.com>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] Improve error message in rebase conflict
Date: Sun, 30 May 2010 14:20:44 +0200	[thread overview]
Message-ID: <1275222044-511-1-git-send-email-artagnon@gmail.com> (raw)

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

             reply	other threads:[~2010-05-30 12:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-30 12:20 Ramkumar Ramachandra [this message]
2010-05-30 12:44 ` [PATCH] Improve error message in rebase conflict Sverre Rabbelier
2010-05-30 13:35   ` Ramkumar Ramachandra

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

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

  git send-email \
    --in-reply-to=1275222044-511-1-git-send-email-artagnon@gmail.com \
    --to=artagnon@gmail.com \
    --cc=ddrowley@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
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 NNTP newsgroup(s).