On 1/16/07, Jakub Narebski <jnareb@xxxxxxxxx> wrote:
Johannes Schindelin wrote: > On Tue, 16 Jan 2007, Junio C Hamano wrote: > >> "Nikolai Weibull" <now@xxxxxxxx> writes: >> >>> If we're going down this slippery slope, why not just give up and add >>> a --xml switch instead? Readable by all... >> >> Perhaps all except humans. >> >> At least YAML, please...
> P.S.: The more I think about it, we should just use the output of > "repo-config -l".
It wouldn't work. Subsection and value are (almost) free form, and they can contain '=' in them.
Sadly, yes. It would be very nice if -l gave unambiguous output for all cases, but perhaps -l is more for parsing by people than by seds.
But I agree that XML is serious overkill...
I don't know if it was clear from my first mail, but I wasn't suggesting --xml as a serious alternative. My point was that if we're going to go through all the fuss of adding all these switches for outputting the configuration file in some fixed format, why not go with one that at least is universal in some sense (not necessarily XML). And, as Johannes already pointed out, it's very disturbing having to dump a configuration file so that it is more easily read by other programs. That would suggest that the ini-based format for git's configuration file is suboptimal. Of course, once git is librified (which is still a long-term goal, right?), languages could create bindings to the git library, which would provide access functions to the configuration file. Then we would truly have that one parser to rule them all. nikolai - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html