Skip to content

Commit

Permalink
Fix tracing when GIT_TRACE is set to an empty string.
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
chriscool authored and Junio C Hamano committed Oct 14, 2006
1 parent 8f97778 commit 6844fc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion trace.c
Expand Up @@ -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;
Expand Down

0 comments on commit 6844fc8

Please sign in to comment.