@@ -435,6 +435,7 @@ static int prepare_cmd(struct strvec *out, const struct child_process *cmd)
}
}
+ trace_argv_printf(&out->v[1], "trace: prepare_cmd:");
return 0;
}
@@ -44,4 +44,11 @@ test_expect_success 'run-command formats empty args properly' '
test_cmp expect actual
'
+test_expect_success 'tracing a shell alias with arguments shows full prepared command' '
+ git config alias.echo "!echo \$*" &&
+ env GIT_TRACE=1 git echo argument 2>output &&
+ cp output /tmp/output &&
+ test_grep "^trace: prepare_cmd: /bin/sh -c '\''echo \$\* \"\$@\"" output
+'
+
test_done