summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2013-05-12 17:26:39 +0530
committerJunio C Hamano <gitster@pobox.com>2013-05-12 23:20:07 -0700
commit15d4bf2e1e4f9853a17a86eb923b55d41da22d54 (patch)
treeee8760de813a68cb89a72e502ff6c71a93d3b711 /git-rebase--interactive.sh
parenta1549e1049439386b9fd643fae236ad3ba649650 (diff)
downloadgit-15d4bf2e1e4f9853a17a86eb923b55d41da22d54.tar.gz
rebase -i: return control to caller, for housekeeping
Return control to the caller git-rebase.sh to get these two tasks rm -fr "$dotest" git gc --auto done by it. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 34111395b5..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