@@ -1292,7 +1292,7 @@ static int bisect_run(struct bisect_terms *terms, int argc, const char **argv)
puts(_("bisect found first bad commit"));
res = BISECT_OK;
} else if (res) {
- error(_("bisect run failed: 'bisect-state %s'"
+ error(_("bisect run failed: 'git bisect %s'"
" exited with error code %d"), new_state, res);
} else {
continue;
@@ -1221,4 +1221,14 @@ test_expect_success 'bisect state output with bad commit' '
grep -F "waiting for good commit(s), bad commit known" output
'
+test_expect_success 'verify correct error message' '
+ git bisect reset &&
+ git bisect start $HASH4 $HASH1 &&
+ write_script test_script.sh <<-\EOF &&
+ rm .git/BISECT*
+ EOF
+ test_must_fail git bisect run ./test_script.sh 2>error &&
+ grep "git bisect good.*exited with error code" error
+'
+
test_done