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

1 messages from 2007-01-08 to 2007-01-08. Participants: Jakub Narebski.
Thread: https://gitlist.dev/t/6278

## Jakub Narebski, 2007-01-08 02:41

Subject: Bug (?) in setting values with git-repo-config
Message-ID: <ensb0c$si4$1@sea.gmane.org>
URL: https://gitlist.dev/e/ensb0c%24si4%241%40sea.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

```
