From: Junio C Hamano Date: Sun, 30 Sep 2012 05:28:05 +0000 (-0700) Subject: Merge branch 'js/rebase-exec-command-not-found' X-Git-Tag: v1.8.0-rc0~17 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f5fd2a7d179a8bb843ec44d2a594e6ccf50dfb3a?hp=a275e823aceff5ddb5a49d4bfd1a0e96da312597 Merge branch 'js/rebase-exec-command-not-found' * js/rebase-exec-command-not-found: rebase -i: fix misleading error message after 'exec no-such' instruction --- diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index a09e8423dd..56707d7a27 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -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 diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 7304b663c3..7a7176088b 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -118,6 +118,17 @@ test_expect_success 'rebase -i with the exec command checks tree cleanness' ' git rebase --continue ' +test_expect_success 'rebase -i with exec of inexistent command' ' + git checkout master && + test_when_finished "git rebase --abort" && + ( + FAKE_LINES="exec_this-command-does-not-exist 1" && + export FAKE_LINES && + test_must_fail git rebase -i HEAD^ >actual 2>&1 + ) && + ! grep "Maybe git-rebase is broken" actual +' + test_expect_success 'no changes are a nop' ' git checkout branch2 && git rebase -i F &&