diff options
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r-- | git-rebase--interactive.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 5822b2c592..f953d8d224 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -628,17 +628,16 @@ do_next () { "$GIT_DIR"/hooks/post-rewrite rebase < "$rewritten_list" true # we don't care if this hook failed fi && - rm -rf "$state_dir" && - git gc --auto && warn "Successfully rebased and updated $head_name." - exit + return 1 # not failure; just to break the do_rest loop } +# can only return 0, when the infinite loop breaks do_rest () { while : do - do_next + do_next || break done } @@ -805,11 +804,13 @@ first and then run 'git rebase --continue' again." require_clean_work_tree "rebase" do_rest + return 0 ;; skip) git rerere clear do_rest + return 0 ;; edit-todo) git stripspace --strip-comments <"$todo" >"$todo".new @@ -842,7 +843,7 @@ then fi orig_head=$(git rev-parse --verify HEAD) || die "No HEAD?" -mkdir "$state_dir" || die "Could not create temporary $state_dir" +mkdir -p "$state_dir" || die "Could not create temporary $state_dir" : > "$state_dir"/interactive || die "Could not mark as interactive" write_basic_state |