@@ -1141,7 +1141,7 @@ static int get_first_good(const char *refname UNUSED,
return 1;
}
-static int do_bisect_run(const char *command)
+static int do_bisect_run(const char *command, int argc UNUSED, const char **argv UNUSED)
{
struct child_process cmd = CHILD_PROCESS_INIT;
@@ -1151,7 +1151,7 @@ static int do_bisect_run(const char *command)
return run_command(&cmd);
}
-static int verify_good(const struct bisect_terms *terms, const char *command)
+static int verify_good(const struct bisect_terms *terms, const char *command, int argc, const char **argv)
{
int rc;
enum bisect_error res;
@@ -1171,7 +1171,7 @@ static int verify_good(const struct bisect_terms *terms, const char *command)
if (res != BISECT_OK)
return -1;
- rc = do_bisect_run(command);
+ rc = do_bisect_run(command, argc, argv);
res = bisect_checkout(¤t_rev, no_checkout);
if (res != BISECT_OK)
@@ -1198,7 +1198,7 @@ static int bisect_run(struct bisect_terms *terms, const char **argv, int argc)
sq_quote_argv(&command, argv);
while (1) {
- res = do_bisect_run(command.buf);
+ res = do_bisect_run(command.buf, argc, argv);
/*
* Exit code 126 and 127 can either come from the shell
@@ -1208,7 +1208,7 @@ static int bisect_run(struct bisect_terms *terms, const char **argv, int argc)
* missing or non-executable script.
*/
if (is_first_run && (res == 126 || res == 127)) {
- int rc = verify_good(terms, command.buf);
+ int rc = verify_good(terms, command.buf, argc, argv);
is_first_run = 0;
if (rc < 0) {
error(_("unable to verify '%s' on good"
Commit d1bbbe45df8 (bisect--helper: reimplement `bisect_run` shell function in C, 2021-09-13) has changed the logging of bisect-run by adding one more space before argv[0], and single-quoting all arguments. In a later change, we would like to restore the old behaviours, which would need information regarding argc and argv. Let's pass them down, now. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> --- builtin/bisect--helper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)