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

Re: 0.99.9 on Saturday next week.

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:09


On Tue, 25 Oct 2005, Junio C Hamano wrote:
Catalin Marinas [off-list ref] writes:
quoted
quoted
 - 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help