Code

rebase: check for errors from git-commit
authorEric Wong <normalperson@yhbt.net>
Wed, 28 Jun 2006 10:24:23 +0000 (03:24 -0700)
committerJunio C Hamano <junkio@cox.net>
Wed, 28 Jun 2006 10:54:31 +0000 (03:54 -0700)
commit does not always succeed, so we'll have to check for
it in the absence of set -e.  This fixes a regression
introduced in 9e4bc7dd1bb9d92491c475cec55147fa0b3f954d

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-rebase.sh

index fd0e7c498d8cdfe210fd0b34f6b0e7acaf8b381a..3945e067141ec1bc87456179a59de8f692bdf9fa 100755 (executable)
@@ -54,8 +54,13 @@ continue_merge () {
 
        if test -n "`git-diff-index HEAD`"
        then
+               if ! git-commit -C "`cat $dotest/current`"
+               then
+                       echo "Commit failed, please do not call \"git commit\""
+                       echo "directly, but instead do one of the following: "
+                       die "$RESOLVEMSG"
+               fi
                printf "Committed: %0${prec}d" $msgnum
-               git-commit -C "`cat $dotest/current`"
        else
                printf "Already applied: %0${prec}d" $msgnum
        fi