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

Re: [PATCH] Auto-quote config values in config.c:store_write_pair()

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 9, 2007, 10:29 UTC
Message-ID
<Pine.LNX.4.63.0701091128170.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<20070109052741.GB27927@Hermes.local>
Hi,
On Tue, 9 Jan 2007, Brian Gernhardt wrote:
Show 11 quoted lines
> +	if (quote)
> +		write(fd, "\"", 1);
>  	for (i = 0; value[i]; i++)
>  		switch (value[i]) {
>  		case '\n': write(fd, "\\n", 2); break;
> @@ -508,6 +520,8 @@ static void store_write_pair(int fd, const char* key, const char* value)
>  		case '"': case '\\': write(fd, "\\", 1);
>  		default: write(fd, value+i, 1);
>  	}
> +	if (quote)
> +		write(fd, "\"", 1);
AFAICS this misses the case where you have to quote a single '"'.

Ciao, Dscho

Previous: Junio C HamanoNext: Johannes Schindelin
Message 3 of 4 in “Auto-quote config values in config.c:store_write_pair()”
  1. Auto-quote config values in config.c:store_write_pair()Brian Gernhardt, Jan 9, 2007
  2. Junio C HamanoJan 9, 2007
  3. Johannes SchindelinJan 9, 2007
  4. Johannes SchindelinJan 9, 2007

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.