rebase -i: fix misleading error message after 'exec no-such' instruction
[gitweb.git] / git-rebase--interactive.sh
index 0d2056f027cbd6811faee3c45088a11b24d86102..56707d7a279274d4086b3eb3f1d1810f66fa8aed 100644 (file)
@@ -544,6 +544,10 @@ do_next () {
                        warn
                        warn "  git rebase --continue"
                        warn
+                       if test $status -eq 127         # command not found
+                       then
+                               status=1
+                       fi
                        exit "$status"
                elif test "$dirty" = t
                then
@@ -569,11 +573,10 @@ do_next () {
        test -s "$todo" && return
 
        comment_for_reflog finish &&
-       shortonto=$(git rev-parse --short $onto) &&
        newhead=$(git rev-parse HEAD) &&
        case $head_name in
        refs/*)
-               message="$GIT_REFLOG_ACTION: $head_name onto $shortonto" &&
+               message="$GIT_REFLOG_ACTION: $head_name onto $onto" &&
                git update-ref -m "$message" $head_name $newhead $orig_head &&
                git symbolic-ref \
                  -m "$GIT_REFLOG_ACTION: returning to $head_name" \