Hi,
In case of a strange .git/config file "git config key value" can create a
bogus config entry, where one old value is wrong and the new value resides in
the wrong section until the config file is fixed up by hand
The attached test config has a trailing tab in the last line
and no newline after that.
When git config is run the new section name is placed directly after the
trailing tab, which corrupts the old value.
To reproduce the error do the following:
mkdir git_test_config && cd git_test_config
git init
<copy the attached config file to .git/config>
git config section2.key bar
git config --get section2.key
-> returns nothing
git config --get section.key
-> foo [section2]
-> error: More than one value for the key section.key: bar
i tried to make a test out of this but i failed to create a config file
without a trailing newline using here documents :-(
Tested using v1.5.4.rc2 and v1.5.4-rc2-6-gab11903
Greetings Peter