X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=trace.c;h=27fef868c4e2276638873cbda7d353cf4b8f67ed;hb=7447b4bc837d2f73fb4cd34f2a44a0cb120c5c39;hp=f9efc918b8a0aa907a36edd107a2fa2a14582e78;hpb=6d2489235f5430071b8df2281c5f9ce00097bb31;p=git.git diff --git a/trace.c b/trace.c index f9efc918b..27fef868c 100644 --- a/trace.c +++ b/trace.c @@ -55,7 +55,8 @@ static int get_trace_fd(int *need_close) { char *trace = getenv("GIT_TRACE"); - if (!trace || !strcmp(trace, "0") || !strcasecmp(trace, "false")) + if (!trace || !strcmp(trace, "") || + !strcmp(trace, "0") || !strcasecmp(trace, "false")) return 0; if (!strcmp(trace, "1") || !strcasecmp(trace, "true")) return STDERR_FILENO; @@ -100,7 +101,7 @@ void trace_printf(const char *format, ...) nfvasprintf(&trace_str, format, rest); va_end(rest); - write_or_whine(fd, trace_str, strlen(trace_str), err_msg); + write_or_whine_pipe(fd, trace_str, strlen(trace_str), err_msg); free(trace_str); @@ -138,7 +139,7 @@ void trace_argv_printf(const char **argv, int count, const char *format, ...) strncpy(trace_str + format_len, argv_str, argv_len); strcpy(trace_str + trace_len - 1, "\n"); - write_or_whine(fd, trace_str, trace_len, err_msg); + write_or_whine_pipe(fd, trace_str, trace_len, err_msg); free(argv_str); free(format_str);