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>

Ramkumar Ramachandra committed May 12, 2013 at 17:26 UTC 15d4bf2e1e4f9853a17a86eb923b55d41da22d54
1 file changed +5 -4
git-rebase--interactive.sh
+5 -4
@@ -628,17 +628,16 @@ do_next () {
628 "$GIT_DIR"/hooks/post-rewrite rebase < "$rewritten_list"
629 true # we don't care if this hook failed
630 fi &&
631 - rm -rf "$state_dir" &&
632 - git gc --auto &&
631 warn "Successfully rebased and updated $head_name."
632
635 - exit
633 + return 1 # not failure; just to break the do_rest loop
634 }
635
636 +# can only return 0, when the infinite loop breaks
637 do_rest () {
638 while :
639 do
641 - do_next
640 + do_next || break
641 done
642 }
643
@@ -805,11 +804,13 @@ first and then run 'git rebase --continue' again."
804
805 require_clean_work_tree "rebase"
806 do_rest
807 + return 0
808 ;;
809 skip)
810 git rerere clear
811
812 do_rest
813 + return 0
814 ;;
815 edit-todo)
816 git stripspace --strip-comments <"$todo" >"$todo".new