author | Jeff King <peff@peff.net> | |
Thu, 24 Feb 2011 14:28:59 +0000 (09:28 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 8 Mar 2011 20:12:04 +0000 (12:12 -0800) | ||
commit | 39bc5e4680a1ed7192968fbe9f5784ad56ecbd36 | |
tree | ca97ba49a31a39d59a5d61bf4cfcf07904317255 | tree | snapshot |
parent | 06796607ef557e8913f1797cca3c98ce4844c36c | commit | diff |
trace: factor out "do we want to trace" logic
As we add more tracing areas, this will avoid repeated code.
Technically, trace_printf already checks this and will avoid
printing if the trace key is not set. However, callers may
want to find out early whether or not tracing is enabled so
they can avoid doing work in the common non-trace case.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
As we add more tracing areas, this will avoid repeated code.
Technically, trace_printf already checks this and will avoid
printing if the trace key is not set. However, callers may
want to find out early whether or not tracing is enabled so
they can avoid doing work in the common non-trace case.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h | diff | blob | history | |
trace.c | diff | blob | history |