Re: Add ".git/config" file parser
- From
- H. Peter Anvin <hpa@zytor.com>
- Date
- Oct 10, 2005, 21:50 UTC
- Message-ID
- <434AE209.60605@zytor.com>
- In-Reply-To
- <Pine.LNX.4.64.0510101446180.14597@g5.osdl.org>
Linus Torvalds wrote:
Show 20 quoted lines
> > On Mon, 10 Oct 2005, Linus Torvalds wrote: > >> ; core variables >> [core] >> ; Don't trust file modes >> filemode = false >> >> ; Our diff algorithm >> [diff] >> external = "/usr/local/bin/gnu-diff -u" >> renames = true >> >>which parses into two variables: "core.filemode" is associated with the >>string "false", and "diff.external" gets the appropriate quoted value. > > _Three_ variables. Duh. I added the "renames" thing later, as I was > looking at what kinds of default flags the "git-diff-xyz" family might be > interested in having. >
A suggestion: if you make your basic types (integer, string, boolean) recognizable by the parser, you can present them in that way. This pretty much means strings will have to always be double-quoted, but that avoids a bunch of ambiguities.
-hpa