Thread (15 messages) flat view 15 messages, 5 authors, 2016-06-15

Re: [RFC] Git config file reader in Perl (WIP)

From: Nikolai Weibull <hidden>
Date: 2016-06-15 22:42:49

On 1/15/07, Johannes Schindelin [off-list ref] wrote:
On Mon, 15 Jan 2007, Nikolai Weibull wrote:
quoted
On 1/15/07, Johannes Schindelin [off-list ref] wrote:
quoted
quoted
On Mon, 15 Jan 2007, Eric Wong wrote:
quoted
quoted
quoted
quoted
Would you write "git repo-config --perl", then? ;-)
quoted
quoted
quoted
The below patch should be a start (only tested on my fairly standard
.git/config).  A --python option should be easy, too :)
quoted
quoted
A bit shorter (and gets the booleans right, plus being even easier
towards --python extension):
quoted
If we're going down this slippery slope, why not just give up and add
a --xml switch instead?
AFAIR this switch was meant to _enhance_ performance.
As far as I can tell, comparing fork() vs. reading a dump with eval
vs. XML isn't meaningful - parsing a 20-line XML file can hardly be
much more (if it even is more) expensive than evaling a file of the
same length.
quoted
That said, parsing the config file as-is can't be so difficult that we
need to export it to separate files with a different syntax, now can it?
The point is having one parser to rule them all, and avoid having
different parsers, all with their own set of shortcomings.
So then you must agree that having one export format makes a lot of
sense, for the same reasons.  Not that I think that an export format
makes sense in the first place.

  nikolai
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help