git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git config multiple values
@ 2017-10-06 11:10 aleksander.baranowski
  2017-10-06 14:32 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: aleksander.baranowski @ 2017-10-06 11:10 UTC (permalink / raw)
  To: git

Hi,

I'm currently using git version 2.14.2. There is possible to put
multiple values into same variable with git config.

Case 1:
# git config --global user.name Foo - returns 0
# git config --global user.name Bar - returns 0 and replace Foo to Bar
# git config --global user.name Foo - returns 0 and replace Bar to Foo

Case 2:
# git config --global user.name Foo - returns 0
# git config --global user.name Foo2 Bar - returns 0 and put second name
# cat ~/.gitconfig
[user]
	email = aleksander.baranowski@yahoo.pl
	name = Foo
	name = Foo2
# git config --global user.name Foo - return 5 and message
"warning: user.name has multiple values
error: cannot overwrite multiple values with a single value
       Use a regexp, --add or --replace-all to change user.name."

It's just an opinion, but this behaviour is no consistent for me.

If it's not the bug it's a feature just let me know.

Bests,
Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-06 18:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06 11:10 Git config multiple values aleksander.baranowski
2017-10-06 14:32 ` Jeff King
2017-10-06 16:57   ` aleksander.baranowski
2017-10-06 17:25   ` Jonathan Nieder
2017-10-06 17:28     ` Jeff King
2017-10-06 18:58     ` Andreas Heiduk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).