On Sun, Feb 20 2022, Junio C Hamano wrote: [I forgot to CC Karsten Blees] > Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > >> The definition of "TRACE_CONTEXT" as "__FILE__" added in >> e05bed960d3 (trace: add 'file:line' to all trace output, 2014-07-12) >> appeared between v6[1] and v7[2] of the series that added it. >> >> It does not appear to have been something anybody asked for, and >> doesn't seem to have been used by anyone since then to override it to >> something other than the default __FILE__. > > Sorry, but I do not quite follow. How can we claim nobody used it, > given that it should be usable with CFLAGS=-DTRACE_CONTEXT=ANYTHING? > > On the other hand, I do not see how it is hurting anybody to have > this indirection today. > > Or am I missing something obvious? I don't know that, but: * From the list discussion at the time it seems nobody asked for this, it was just something the author "snuck in" between re-rolls. * I didn't find any subsequent on-list discussion of people actually using this. Both leads me to believe that this was a neat-at-the-time but never used for anything outside one-off testing feature. Perhaps you'd like a v4 without this. It isn't strictly needed, but where I'm going with this series is improving the usage.c output/passing of these __{FILE,LINE,FUNCTION}__. I don't need it now, but if we'd eventually like to unify trace & trace2 we'll need to deal with this part, since those functions won't deal well with replacing a __FILE__ "just pass whatever data you'd like here".