git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix tracing when GIT_TRACE is set to an empty string.

From
Christian Couder <chriscool@tuxfamily.org>
Date
Oct 14, 2006, 19:55 UTC
Message-ID
<200610142155.32816.chriscool@tuxfamily.org>
In-Reply-To
<7vodseahty.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 30 quoted lines
> Christian Couder <chriscool@tuxfamily.org> writes:
> > Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> > ---
> >  trace.c |    3 ++-
> >  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;
> > --
> > 1.4.3.rc2.gadba
>
> This means that
>
> 	GIT_TRACE= git-foo
> and
> 	unset GIT_TRACE ; git-foo
>
> should behave the same way, right?
Yes, that's the goal of this patch.
> If so that sounds sensible.

Thanks, Christian.

Previous: Junio C Hamano
Message 3 of 3 in “Fix tracing when GIT_TRACE is set to an empty string.”
  1. Fix tracing when GIT_TRACE is set to an empty string.Christian Couder, Oct 14, 2006
  2. Junio C HamanoOct 14, 2006
  3. Christian CouderOct 14, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.