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

Can't assign user.name to "E F" in git config

From
DMDisc Magnet <discmagnet@gmail.com>
Date
Mar 29, 2010, 20:32 UTC
Message-ID
<308d4701003291332s500cbbci68e10a784ac1aa81@mail.gmail.com>

I've never done a git init and I don't have any .git directory in the current directory. I get warnings in the following example. Moreover, I can't assign user.name to "E F".

humpty@wall:~/work$ rm ~/.gitconfig
humpty@wall:~/work$ git config --global user.name A B
humpty@wall:~/work$ git config --global user.name C D
humpty@wall:~/work$ git config --global user.name "E F"
warning: user.name has multiple values
humpty@wall:~/work$ git config -l
user.name=A
user.name=C
humpty@wall:~/work$ cat ~/.gitconfig
[user]
        name = A
        name = C
However, everything works fine here.
humpty@wall:~/work$ rm ~/.gitconfig
humpty@wall:~/work$ git config --global user.name A
humpty@wall:~/work$ git config --global user.name C
humpty@wall:~/work$ git config --global user.name "E F"
humpty@wall:~/work$ git config -l
user.name=E F
humpty@wall:~/work$ cat ~/.gitconfig
[user]
        name = E F

The same behavior can be reproduced after doing git init and by removing the --global option.

Is this an expected behavior or is it a bug?
Next: Avery Pennarun
Message 1 of 2 in “Can't assign user.name to "E F" in git config”
  1. Disc MagnetMar 29, 2010
  2. Avery PennarunMar 29, 2010

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.