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

Re: [RFC/PATCH] transport-helper: initialize debug flag before starting threads

From
Jeff King <peff@peff.net>
Date
Dec 8, 2014, 10:36 UTC
Message-ID
<20141208103624.GA11737@peff.net>
In-Reply-To
<20141208082206.GA28302@peff.net>
On Mon, Dec 08, 2014 at 03:22:06AM -0500, Jeff King wrote:
Show 13 quoted lines
>  /* Print bidirectional transfer loop debug message. */
>  __attribute__((format (printf, 1, 2)))
>  static void transfer_debug(const char *fmt, ...)
>  {
>  	va_list args;
>  	char msgbuf[PBUFFERSIZE];
> -	static int debug_enabled = -1;
>  
> -	if (debug_enabled < 0)
> -		debug_enabled = getenv("GIT_TRANSLOOP_DEBUG") ? 1 : 0;
> -	if (!debug_enabled)
> +	if (!transport_debug_enabled)
>  		return;

I think in my cover letter I made clear that this was not really meant for inclusion as-is, but just in case: this obviously is missing "()" at the end of the function call (interestingly gcc -Wall complains, but clang does not).

-Peff
Previous: Jeff King
Message 2 of 2 in “transport-helper: initialize debug flag before starting threads”
  1. transport-helper: initialize debug flag before starting threadsJeff King, Dec 8, 2014
  2. Jeff KingDec 8, 2014

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.