@@ -1141,11 +1141,14 @@ static int get_first_good(const char *refname UNUSED,
return 1;
}
-static int do_bisect_run(const char *command, int argc UNUSED, const char **argv UNUSED)
+static int do_bisect_run(const char *command, int argc, const char **argv)
{
struct child_process cmd = CHILD_PROCESS_INIT;
+ struct strbuf buf = STRBUF_INIT;
- printf(_("running %s\n"), command);
+ strbuf_join_argv(&buf, argc, argv, ' ');
+ printf(_("running %s\n"), buf.buf);
+ strbuf_release(&buf);
cmd.use_shell = 1;
strvec_push(&cmd.args, command);
return run_command(&cmd);
@@ -1260,13 +1263,13 @@ static int bisect_run(struct bisect_terms *terms, const char **argv, int argc)
if (res == BISECT_ONLY_SKIPPED_LEFT)
error(_("bisect run cannot continue any more"));
else if (res == BISECT_INTERNAL_SUCCESS_MERGE_BASE) {
- printf(_("bisect run success"));
+ puts(_("bisect run success"));
res = BISECT_OK;
} else if (res == BISECT_INTERNAL_SUCCESS_1ST_BAD_FOUND) {
- printf(_("bisect found first bad commit"));
+ puts(_("bisect run success"));
res = BISECT_OK;
} else if (res) {
- error(_("bisect run failed: 'git bisect--helper --bisect-state"
+ error(_("bisect run failed: 'bisect-state"
" %s' exited with error code %d"), new_state, res);
} else {
continue;
@@ -285,7 +285,7 @@ test_bisect_run_args () {
test_cmp expect.args actual.args
}
-test_expect_failure 'git bisect run: args, stdout and stderr with no arguments' '
+test_expect_success 'git bisect run: args, stdout and stderr with no arguments' '
test_bisect_run_args <<-\EOF_ARGS 6<<-EOF_OUT 7<<-\EOF_ERR
EOF_ARGS
running ./run.sh
@@ -295,7 +295,7 @@ test_expect_failure 'git bisect run: args, stdout and stderr with no arguments'
EOF_ERR
'
-test_expect_failure 'git bisect run: args, stdout and stderr: "--" argument' '
+test_expect_success 'git bisect run: args, stdout and stderr: "--" argument' '
test_bisect_run_args -- <<-\EOF_ARGS 6<<-EOF_OUT 7<<-\EOF_ERR
<-->
EOF_ARGS
@@ -306,7 +306,7 @@ test_expect_failure 'git bisect run: args, stdout and stderr: "--" argument' '
EOF_ERR
'
-test_expect_failure 'git bisect run: args, stdout and stderr: "--log foo --no-log bar" arguments' '
+test_expect_success 'git bisect run: args, stdout and stderr: "--log foo --no-log bar" arguments' '
test_bisect_run_args --log foo --no-log bar <<-\EOF_ARGS 6<<-EOF_OUT 7<<-\EOF_ERR
<--log>
<foo>
@@ -320,7 +320,7 @@ test_expect_failure 'git bisect run: args, stdout and stderr: "--log foo --no-lo
EOF_ERR
'
-test_expect_failure 'git bisect run: args, stdout and stderr: "--bisect-start" argument' '
+test_expect_success 'git bisect run: args, stdout and stderr: "--bisect-start" argument' '
test_bisect_run_args --bisect-start <<-\EOF_ARGS 6<<-EOF_OUT 7<<-\EOF_ERR
<--bisect-start>
EOF_ARGS