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

Bug (?) in setting values with git-repo-config

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 8, 2007, 02:41 UTC
Message-ID
<ensb0c$si4$1@sea.gmane.org>

Currently there is no way to set up configuration variable to a value with preceding whitespace, trailing whitespace, or one of comment delimiters ('#' or ';'). And one can't use "..." for that, because even encompassing doublequotes gets escaped.

I think that git-repo-config should detect if value needs to be quoted, and do that automatically...

$ declare -x GIT_CONFIG=gitconf
$ git repo-config section.key "value with # inside" 
$ git repo-config --get section.key                    
value with
$ git repo-config section.key2 '"value with # inside"'
$ git repo-config --get section.key2 
"value with
$ cat gitconf 
[section]
        key = value with # inside
        key2 = \"value with # inside\"
(and the value should be:
        keyn = "value with # inside"
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Message 1 of 1 in “Bug (?) in setting values with git-repo-config”
  1. Jakub NarebskiJan 8, 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.