Signed-off-by: Jörg Sommer <joerg@xxxxxxxxxxxx> --- git-rebase--interactive.sh | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 8aa7371..531ee94 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -104,8 +104,12 @@ die_with_patch () { die "$2" } -die_abort () { +cleanup_before_quit () { rm -rf "$DOTEST" +} + +die_abort () { + cleanup_before_quit die "$1" } @@ -352,7 +356,7 @@ do_next () { test ! -f "$DOTEST"/verbose || git diff-tree --stat $(cat "$DOTEST"/head)..HEAD } && - rm -rf "$DOTEST" && + cleanup_before_quit && git gc --auto && warn "Successfully rebased and updated $HEADNAME." @@ -414,7 +418,7 @@ do ;; esac && output git reset --hard $HEAD && - rm -rf "$DOTEST" + cleanup_before_quit exit ;; --skip) -- 1.5.5 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html