trace: factor out "do we want to trace" logic
commit39bc5e4680a1ed7192968fbe9f5784ad56ecbd36
authorJeff King <peff@peff.net>
Thu, 24 Feb 2011 14:28:59 +0000 (24 09:28 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Mar 2011 20:12:04 +0000 (8 12:12 -0800)
treeca97ba49a31a39d59a5d61bf4cfcf07904317255
parent06796607ef557e8913f1797cca3c98ce4844c36c
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>
cache.h
trace.c