From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason at zx2c4.com (Jason A. Donenfeld) Date: Mon, 12 Aug 2013 12:35:28 -0600 Subject: [PATCH] configfile: Use git's internal config system instead. In-Reply-To: <20130604185202.GA29937@blizzard> References: <1370368728-27214-1-git-send-email-Jason@zx2c4.com> <20130604185202.GA29937@blizzard> Message-ID: On Tue, Jun 4, 2013 at 8:52 PM, Lukas Fleischer wrote: > git_config_from_file() does not allow dots (".") inside configuration > variable names (since they are used to delimit sections from keys). If > we want to use the Git configuration system like this, we have to change > our configuration file format to use sections ("[repo]") instead of > prefixing each variable ("repo."). I had feared this would be the case. I still think it might be worthwhile to pursue revamping our configuration format to use git_config_from_file along with all its niceties. This would also put us somewhat more in line with upstream git and would allow all sorts of neat things -- for example instead of a per-repo cgitrc, a repo's bare gitconfig file could be used instead. We already support reading a few keys out of it, and moving to using git's config format for everything would allow us to unify all of this. This would, of course, break compatibility to a certain degree. Migration strategies might include one of these -- 1) we just break things and leave a note about that in the release notes of a major version bump; 2) we support both parsers for an amount of time along with a depreciated warning message; 3) we write a simple format converter that either a) runs automatically or b) is included in contrib and announced in the release notes. I'd probably lean toward 3b, but I'm open to all opinions here.