]> rtime.felk.cvut.cz Git - git.git/blobdiff - trace.c
Update draft release notes to 1.7.2
[git.git] / trace.c
diff --git a/trace.c b/trace.c
index 4229ae1231d69aedd9f1aa8350989ddbe2bdb845..1e560cb0b977e19beeb095497c8e4f6280b7f0d6 100644 (file)
--- a/trace.c
+++ b/trace.c
 #include "cache.h"
 #include "quote.h"
 
+void do_nothing(size_t unused)
+{
+}
+
 /* Get a trace file descriptor from GIT_TRACE env variable. */
 static int get_trace_fd(int *need_close)
 {
@@ -72,6 +76,7 @@ void trace_printf(const char *fmt, ...)
        if (!fd)
                return;
 
+       set_try_to_free_routine(do_nothing);    /* is never reset */
        strbuf_init(&buf, 64);
        va_start(ap, fmt);
        len = vsnprintf(buf.buf, strbuf_avail(&buf), fmt, ap);
@@ -103,6 +108,7 @@ void trace_argv_printf(const char **argv, const char *fmt, ...)
        if (!fd)
                return;
 
+       set_try_to_free_routine(do_nothing);    /* is never reset */
        strbuf_init(&buf, 64);
        va_start(ap, fmt);
        len = vsnprintf(buf.buf, strbuf_avail(&buf), fmt, ap);