git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git rebase --continue error message
@ 2008-06-22  3:21 Lea Wiemann
  2008-06-22 14:07 ` [PATCH] git-rebase.sh: Add check if rebase is in progress Stephan Beyer
  0 siblings, 1 reply; 2+ messages in thread
From: Lea Wiemann @ 2008-06-22  3:21 UTC (permalink / raw)
  To: Git Mailing List

The error message for git rebase --continue is misleading if no rebase 
is in progress:

$ git rebase --abort
No rebase in progress?
$ git rebase --continue
You must edit all merge conflicts and then
mark them as resolved using git add

Anyone care to fix it?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] git-rebase.sh: Add check if rebase is in progress
  2008-06-22  3:21 git rebase --continue error message Lea Wiemann
@ 2008-06-22 14:07 ` Stephan Beyer
  0 siblings, 0 replies; 2+ messages in thread
From: Stephan Beyer @ 2008-06-22 14:07 UTC (permalink / raw)
  To: Lea Wiemann; +Cc: Git Mailing List, Junio C Hamano, Stephan Beyer

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
 git-rebase.sh |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index dd7dfe1..74f9c25 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -150,6 +150,9 @@ while test $# != 0
 do
 	case "$1" in
 	--continue)
+		test -d "$dotest" -o -d .dotest ||
+			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"
@@ -178,6 +181,9 @@ do
 		exit
 		;;
 	--skip)
+		test -d "$dotest" -o -d .dotest ||
+			die "No rebase in progress?"
+		
 		git reset --hard HEAD || exit $?
 		if test -d "$dotest"
 		then
@@ -203,16 +209,16 @@ do
 		exit
 		;;
 	--abort)
+		test -d "$dotest" -o -d .dotest ||
+			die "No rebase in progress?"
+		
 		git rerere clear
 		if test -d "$dotest"
 		then
 			move_to_original_branch
-		elif test -d .dotest
-		then
+		else
 			dotest=.dotest
 			move_to_original_branch
-		else
-			die "No rebase in progress?"
 		fi
 		git reset --hard $(cat "$dotest/orig-head")
 		rm -r "$dotest"
-- 
1.5.6.310.g344d

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-22 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-22  3:21 git rebase --continue error message Lea Wiemann
2008-06-22 14:07 ` [PATCH] git-rebase.sh: Add check if rebase is in progress Stephan Beyer

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).