summaryrefslogtreecommitdiff
path: root/trace.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2006-10-14 14:05:25 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-10-14 19:07:05 (GMT)
commit6844fc806ace7d7c31ad788a8886cfd0498ceec5 (patch)
treeb58275366186b9733a23f68fe8625b299376376e /trace.c
parent8f9777801d09b195e1820061914ec27fcd5975c8 (diff)
downloadgit-6844fc806ace7d7c31ad788a8886cfd0498ceec5.zip
git-6844fc806ace7d7c31ad788a8886cfd0498ceec5.tar.gz
git-6844fc806ace7d7c31ad788a8886cfd0498ceec5.tar.bz2
Fix tracing when GIT_TRACE is set to an empty string.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'trace.c')
-rw-r--r--trace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/trace.c b/trace.c
index f9efc91..495e5ed 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;