[PATCH] configfile: Use git's internal config system instead.
Jason A. Donenfeld
Jason at zx2c4.com
Mon Aug 12 20:35:28 CEST 2013
On Tue, Jun 4, 2013 at 8:52 PM, Lukas Fleischer <cgit at cryptocrack.de> 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.
More information about the CGit