Re: [PATCH v5 4/7] trace.c: introduce trace_run_command()

2018-01-17 Thread Junio C Hamano
Jeff King writes: >> +void trace_run_command(const struct child_process *cp) >> +{ >> +struct strbuf buf = STRBUF_INIT; >> + >> +if (!prepare_trace_line(__FILE__, __LINE__, >> +_default_key, )) >> +return; > > I think technically

Re: [PATCH v5 4/7] trace.c: introduce trace_run_command()

2018-01-17 Thread Jeff King
On Mon, Jan 15, 2018 at 05:59:46PM +0700, Nguyễn Thái Ngọc Duy wrote: > diff --git a/trace.c b/trace.c > index 7f3b08e148..da3db301e7 100644 > --- a/trace.c > +++ b/trace.c > @@ -23,6 +23,7 @@ > > #include "cache.h" > #include "quote.h" > +#include "run-command.h" > > struct trace_key

[PATCH v5 4/7] trace.c: introduce trace_run_command()

2018-01-15 Thread Nguyễn Thái Ngọc Duy
This is the same as the old code that uses trace_argv_printf() in run-command.c. This function will be improved in later patches to print more information from struct child_process. A slight regression: the old code would print run-command.c:xxx as the trace location site while the new code