Re: Empty config sections are neither deleted nor reused

2016-05-14 Thread Jonas Bernoulli
Junio C Hamano writes: > Matthieu Moy writes: > >> Junio's explanation must not necessarily be read as "it has to be the >> way it is", but more as "getting it right is harder than you think", and >> that in turn explains why no one changed the

Re: Empty config sections are neither deleted nor reused

2016-05-14 Thread Junio C Hamano
Matthieu Moy writes: > Junio's explanation must not necessarily be read as "it has to be the > way it is", but more as "getting it right is harder than you think", and > that in turn explains why no one changed the behavior. Thanks for clarification. s/must not

Re: Empty config sections are neither deleted nor reused

2016-05-14 Thread Matthieu Moy
Jonas Bernoulli writes: >> The configuration sections can have comments and they are preserved >> even when they become empty. Adding something unrelated will still >> make it appear the stale comment applies to it. > > Now that you mention it, I think I have read that before.

Re: Empty config sections are neither deleted nor reused

2016-05-14 Thread Jonas Bernoulli
> The configuration sections can have comments and they are preserved > even when they become empty. Adding something unrelated will still > make it appear the stale comment applies to it. Now that you mention it, I think I have read that before. Unfortunately I forgot about it until you

Re: Empty config sections are neither deleted nor reused

2016-05-13 Thread Junio C Hamano
Jonas Bernoulli writes: > The only possible combination which doesn't make sense is to not remove > an empty section and to also not reuse an empty section - unfortunately > that's what Git currently does. It is not that simple. The configuration sections can have comments

Empty config sections are neither deleted nor reused

2016-05-13 Thread Jonas Bernoulli
After running git init . git config foo.bar baz git config --unset foo.bar# 1 git config foo.bar baz# 2 .git/config contains [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [foo] [foo]