Skip to content

Commit

Permalink
Reallow git-rebase --interactive --continue if commit is unnecessary
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Dec 20, 2007
1 parent fbcf118 commit 0327062
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-rebase--interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,10 @@ do
test ! -f "$DOTEST"/amend || git reset --soft HEAD^
} &&
export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE &&
git commit --no-verify -F "$DOTEST"/message -e ||
if ! git commit --no-verify -F "$DOTEST"/message -e
then
die "Could not commit staged changes."
fi

require_clean_work_tree
do_rest
Expand Down

0 comments on commit 0327062

Please sign in to comment.