MCPcopy Index your code
hub / github.com/git/git / trace_run_command

Function trace_run_command

run-command.c:655–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653}
654
655static void trace_run_command(const struct child_process *cp)
656{
657 struct strbuf buf = STRBUF_INIT;
658
659 if (!trace_want(&trace_default_key))
660 return;
661
662 strbuf_addstr(&buf, "trace: run_command:");
663 if (cp->dir) {
664 strbuf_addstr(&buf, " cd ");
665 sq_quote_buf_pretty(&buf, cp->dir);
666 strbuf_addch(&buf, ';');
667 }
668 trace_add_env(&buf, cp->env.v);
669 if (cp->git_cmd)
670 strbuf_addstr(&buf, " git");
671 sq_quote_argv_pretty(&buf, cp->args.v);
672
673 trace_printf("%s", buf.buf);
674 strbuf_release(&buf);
675}
676
677int start_command(struct child_process *cmd)
678{

Callers 1

start_commandFunction · 0.85

Calls 7

trace_wantFunction · 0.85
strbuf_addstrFunction · 0.85
sq_quote_buf_prettyFunction · 0.85
strbuf_addchFunction · 0.85
trace_add_envFunction · 0.85
sq_quote_argv_prettyFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected