list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Robin Rosenberg <>
Cc:, Robin Rosenberg <>
Subject: [PATCH] Clean up .dotest if an error occurs before rebase work starts
Date: Wed,  5 Sep 2007 21:27:16 +0200	[thread overview]
Message-ID: <> (raw)

Signed-off-by: Robin Rosenberg <>
--- |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ b/
index 3bd66b0..81c48d1 100755
--- a/
+++ b/
@@ -253,23 +253,33 @@ else
 # The tree must be really really clean.
-git update-index --refresh || exit
+git update-index --refresh || {
+	rm -rf .dotest
+	exit 1
 diff=$(git diff-index --cached --name-status -r HEAD)
 case "$diff" in
 ?*)	echo "cannot rebase: your index is not up-to-date"
 	echo "$diff"
+	rm -rf .dotest
 	exit 1
 # The upstream head must be given.  Make sure it is valid.
-upstream=`git rev-parse --verify "${upstream_name}^0"` ||
-    die "invalid upstream $upstream_name"
+upstream=`git rev-parse --verify "${upstream_name}^0"` || {
+	rm -rf .dotest
+	die "invalid upstream $upstream_name"
 # Make sure the branch to rebase onto is valid.
-onto=$(git rev-parse --verify "${onto_name}^0") || exit
+onto=$(git rev-parse --verify "${onto_name}^0") || {
+	rm -rf .dotest
+	exit 1
 # If a hook exists, give it a chance to interrupt
 if test -x "$GIT_DIR/hooks/pre-rebase"

             reply	other threads:[~2007-09-05 19:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05 19:27 Robin Rosenberg [this message]
2007-09-05 20:07 ` Junio C Hamano

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:

  List information:

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

  git send-email \ \ \ \ \
    --subject='Re: [PATCH] Clean up .dotest if an error occurs before rebase work starts' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

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