Re: [PATCH 01/11] string_list: print_string_list to use trace_printf

2018-09-07 Thread Stefan Beller
On Fri, Sep 7, 2018 at 2:53 AM Junio C Hamano wrote: > > Jeff King writes: > > > I guess the question is: is this a thing we would want to make available > > to code to leave in all the time? Or is it just for sticking in > > temporarily for a quick dump? > > > > If the former, then I think it ne

Re: [PATCH 01/11] string_list: print_string_list to use trace_printf

2018-09-07 Thread Junio C Hamano
Jeff King writes: > I guess the question is: is this a thing we would want to make available > to code to leave in all the time? Or is it just for sticking in > temporarily for a quick dump? > > If the former, then I think it needs the early-return at the least (and > probably _should_ have the k

Re: [PATCH 01/11] string_list: print_string_list to use trace_printf

2018-09-06 Thread Jeff King
On Thu, Sep 06, 2018 at 03:16:21PM -0700, Stefan Beller wrote: > > It seems funny that we'd iterate through the list checking over and over > > whether tracing is enabled. > > > > Should this do: > > > > if (!trace_want(&trace_default_key)) > > return; > > > > at the top? (Or possibly ev

Re: [PATCH 01/11] string_list: print_string_list to use trace_printf

2018-09-06 Thread Stefan Beller
On Thu, Sep 6, 2018 at 9:56 AM Jeff King wrote: > > On Thu, Sep 06, 2018 at 09:52:28AM -0700, Junio C Hamano wrote: > > > Stefan Beller writes: > > > > > It is a debugging aid, so it should print to the debugging channel. > > > > ... and rename it with trace_ prefix. > > > > Use of trace_printf()

Re: [PATCH 01/11] string_list: print_string_list to use trace_printf

2018-09-06 Thread Jeff King
On Thu, Sep 06, 2018 at 09:52:28AM -0700, Junio C Hamano wrote: > Stefan Beller writes: > > > It is a debugging aid, so it should print to the debugging channel. > > ... and rename it with trace_ prefix. > > Use of trace_printf() is nice, as we can control its behavior at > runtime ;-) Yes, t

Re: [PATCH 01/11] string_list: print_string_list to use trace_printf

2018-09-06 Thread Junio C Hamano
Stefan Beller writes: > It is a debugging aid, so it should print to the debugging channel. ... and rename it with trace_ prefix. Use of trace_printf() is nice, as we can control its behavior at runtime ;-) > Signed-off-by: Stefan Beller > --- > string-list.c | 6 +++--- > string-list.h | 4

[PATCH 01/11] string_list: print_string_list to use trace_printf

2018-09-04 Thread Stefan Beller
It is a debugging aid, so it should print to the debugging channel. Signed-off-by: Stefan Beller --- string-list.c | 6 +++--- string-list.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/string-list.c b/string-list.c index 771c4550980..1ebbe1f56ea 100644 --- a/string-l