git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: martin.von.zweigbergk@gmail.com
To: git@vger.kernel.org, gitster@pobox.com
Cc: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Subject: [PATCH 5/5] rebase: read state explicitly in '--abort'
Date: Wed,  3 Nov 2010 22:09:40 +0100	[thread overview]
Message-ID: <1288818580-7576-6-git-send-email-martin.von.zweigbergk@gmail.com> (raw)
In-Reply-To: <1288818580-7576-1-git-send-email-martin.von.zweigbergk@gmail.com>

From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>

The only place where the state was not already read when
move_to_original_branch was called was in the '--abort' case. Read the
state explicitly there and remove it from move_to_original_branch.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
---
 git-rebase.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index a7428ea..847555c 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -147,7 +147,6 @@ call_merge () {
 }
 
 move_to_original_branch () {
-	test -z "$head_name" && read_state
 	case "$head_name" in
 	refs/*)
 		message="rebase finished: $head_name onto $onto"
@@ -266,6 +265,7 @@ do
 			die "No rebase in progress?"
 
 		git rerere clear
+		read_state
 		move_to_original_branch
 		git reset --hard $orig_head
 		rm -r "$state_dir"
-- 
1.7.3.rc1.4.g5879b6

      parent reply	other threads:[~2010-11-04  3:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 21:09 [PATCH 0/5] Make git-rebase.sh more readable and easier to extend martin.von.zweigbergk
2010-11-03 21:09 ` [PATCH 1/5] rebase: clearer names for directory variables martin.von.zweigbergk
2010-11-03 21:09 ` [PATCH 2/5] rebase: refactor reading of state martin.von.zweigbergk
2010-11-03 21:09 ` [PATCH 3/5] rebase: read state outside loop martin.von.zweigbergk
2010-11-03 21:09 ` [PATCH 4/5] rebase: remove unused rebase state 'prev_head' martin.von.zweigbergk
2010-11-03 21:09 ` martin.von.zweigbergk [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=1288818580-7576-6-git-send-email-martin.von.zweigbergk@gmail.com \
    --to=martin.von.zweigbergk@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).