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

Re: 0.99.9 on Saturday next week.

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 25, 2005, 17:41 UTC
Message-ID
<Pine.LNX.4.64.0510251033310.10477@g5.osdl.org>
In-Reply-To
<7virvlh6m5.fsf@assigned-by-dhcp.cox.net>
On Tue, 25 Oct 2005, Junio C Hamano wrote:
Show 9 quoted lines
>
> Catalin Marinas <catalin.marinas@gmail.com> writes:
> 
> >>  - Configuration files (Linus).
> >
> > Since the configuration files use the .ini like syntax, is it OK for
> > StGIT to use the same file, with an "[stgit]" section?
> 
> I think that is a reasonable thing to do.

Absolutely. The whole thing was _designed_ to be used that way. Any C user should be able to just link against config.o without even bothering with the rest of git (the only git-specific thing there should be some naming), and any script user can either

 - parse the simple config language by hand (not really a good idea, but 
   it _is_ pretty simple)
 - just run "git-var -l" and parse the output.
ie if you want to track "[stgit]" config options, just do
	git-var -l | sed '/^stgit\./ s/^stgit.//p'

and it will pick up everything starting with "stgit." and remove that part.

What remains should be a simple list or "variable=value" pairs.
Oh - and the convention is that 
 (a) we've already done any quote expansion (although I may have to make 
     git-var quote "\n" - I didn't care enough to do so)
 (b) a boolean variable without a "=" means that it was set to "true" 
     (which is different from an _empty_ one, which has a "=" but just 
     doesn't have any value)
The (b) thing is just a special case, so that you can write
	[stgit]
		debug
and it will be the same as
	[stgit]
		debug = true
which just seems to be the sane thing to do.
		Linus
Previous: Junio C HamanoNext: Catalin Marinas
Message 5 of 7 in “0.99.9 on Saturday next week.”
  1. Junio C HamanoOct 22, 2005
  2. H. Peter AnvinOct 22, 2005
  3. Catalin MarinasOct 25, 2005
  4. Junio C HamanoOct 25, 2005
  5. Linus TorvaldsOct 25, 2005
  6. Catalin MarinasOct 26, 2005
  7. Linus TorvaldsOct 26, 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.