Minor bug: git config ignores empty sections
- From
Eli Barzilay <eli@barzilay.org>
- Date
- Aug 15, 2016, 01:29 UTC
- Message-ID
- <CALO-gutdz5VMgoRmbqEa9UiaTC+L2Sy2n-3AF+zfPr-X8+1U4A@mail.gmail.com>
Looks like there's a problem with setting a config with an empty section, making it create a new section. The result is:
$ git --version
git version 2.9.2
$ git init
Initialized empty Git repository in /home/eli/t/.git/
$ t() { git config x.y x; git config --unset x.y; }
$ t;t;t
$ grep -c '\[x\]' .git/config
3
$ git config x.z x
$ t;t;t
$ git config x.z x # adds another [x], but leaves it populated
$ t;t;t;t;t;t;t;t
$ grep -c '\[x\]' .git/config
4--
((x=>x(x))(x=>x(x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!