git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Use git-config to Break your Config File
@ 2012-04-24  2:57 David E. Wheeler
  2012-04-26  1:47 ` [PATCH] config: reject bogus section names for --rename-section Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: David E. Wheeler @ 2012-04-24  2:57 UTC (permalink / raw)
  To: git

Gitsters,

I was fooling around and realized that I could assign an empty string as the name of a config section, like so:

    $ git config --rename-section my ''

This leaves the config file looking like this:

    []
        foo = goodbye

Which does not appear to be valid:

    $ git config --get '.foo'          
    fatal: bad config file line 13 in .git/config

So maybe git-config should disallow setting a section to an empty string?

Best,

David

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

end of thread, other threads:[~2012-04-26  4:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-24  2:57 Use git-config to Break your Config File David E. Wheeler
2012-04-26  1:47 ` [PATCH] config: reject bogus section names for --rename-section Jeff King
2012-04-26  4:19   ` Junio C Hamano

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).