git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Add ".git/config" file parser

From
HAH. 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
Previous: Linus TorvaldsNext: Linus Torvalds
Message 13 of 18 in “Seeing various mode changes on cygwin”
  1. Jonas FonsecaOct 8, 2005
  2. Junio C HamanoOct 8, 2005
  3. Alex RiesenOct 8, 2005
  4. Junio C HamanoOct 8, 2005
  5. Linus TorvaldsOct 9, 2005
  6. Junio C HamanoOct 9, 2005
  7. Daniel BarkalowOct 10, 2005
  8. Junio C HamanoOct 10, 2005
  9. Daniel BarkalowOct 10, 2005
  10. Linus TorvaldsOct 10, 2005
  11. Add ".git/config" file parserLinus Torvalds, Oct 10, 2005
  12. Linus TorvaldsOct 10, 2005
  13. H. Peter AnvinOct 10, 2005
  14. Linus TorvaldsOct 10, 2005
  15. Junio C HamanoOct 12, 2005
  16. Use core.filemode.Junio C Hamano, Oct 12, 2005
  17. H. Peter AnvinOct 9, 2005
  18. Alex RiesenOct 9, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.