@matheusbsbs / matheus-bagliano / commits / 03270628ed
Fork 0

Reallow git-rebase --interactive --continue if commit is unnecessary

During git-rebase --interactive's --continue implementation we used to silently restart the rebase if the user had made the commit for us. This is common if the user stops to edit a commit and does so by amending it. My recent change to watch git-commit's exit status broke this behavior. Thanks to Bernt Hansen for catching it in 1.5.4-rc1. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Shawn O. Pearce committed Dec 20, 2007 at 02:12 UTC 03270628ed61f56431658eacd335b8f2f8ecc05a
1 file changed +3 -1
git-rebase--interactive.sh
+3 -1
@@ -372,8 +372,10 @@ do
372 test ! -f "$DOTEST"/amend || git reset --soft HEAD^
373 } &&
374 export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE &&
375 - git commit --no-verify -F "$DOTEST"/message -e ||
375 + if ! git commit --no-verify -F "$DOTEST"/message -e
376 + then
377 die "Could not commit staged changes."
378 + fi
379
380 require_clean_work_tree
381 do_rest