git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: Lea Wiemann <lewiemann@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Stephan Beyer <s-beyer@gmx.net>
Subject: [PATCH] git-rebase.sh: Add check if rebase is in progress
Date: Sun, 22 Jun 2008 16:07:02 +0200	[thread overview]
Message-ID: <1214143622-28897-1-git-send-email-s-beyer@gmx.net> (raw)
In-Reply-To: <485DC551.9020807@gmail.com>

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

      reply	other threads:[~2008-06-22 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-22  3:21 git rebase --continue error message Lea Wiemann
2008-06-22 14:07 ` Stephan Beyer [this message]

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=1214143622-28897-1-git-send-email-s-beyer@gmx.net \
    --to=s-beyer@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lewiemann@gmail.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).