1
0
mirror of https://github.com/git/git.git synced 2024-10-04 06:21:20 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Linus Torvalds
d14f776402 git config syntax updates
This updates the hierarchical section name syntax to

	[section<space>+"<randomstring>"]

where the only rule for "randomstring" is that it can't contain a newline,
and if you really want to insert a double-quote, you do it with \".

It turns that into the section name "secion.randomstring".  The
"section" part is still case insensitive, but the "randomstring"
part is case sensitive.

So you could use this for things like

	[email "torvalds@osdl.org"]
		name = Linus Torvalds

if you wanted to do the "email->name" conversion as part of the config
file format (I'm not claiming that is sensible, I'm just giving it as an
insane example). That would show up as the association

	email.torvalds@osdl.org.name -> Linus Torvalds

which is easy to parse (the "." in the email _looks_ ambiguous, but it
isn't: you know that there will always be a single key-name, so you find
the key name with "strrchr(name, '.')" and things are entirely
unambiguous).

Repo-config is updated to be able to parse the new format, and also
write things out in the new format.

[jc: rolled two patches from Linus and one fix-up from Sean into one,
 with additional adjustments for t/t1300 test to check the case
 insensitiveness of section base and variable and case sensitiveness
 of the extended section part.  Then stripped some part off to make
 the result applicable to the stale 1.3.X series that does not have
 recent enhancements. ]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-13 14:00:16 -07:00
Jonas Fonseca
f067a13745 repo-config: give value_ a sane default so regexec won't segfault
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-07 17:06:10 -08:00
Junio C Hamano
1fdfd05db2 tests: make scripts executable
just for consistency.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-12-19 18:27:04 -08:00
Junio C Hamano
53e7181cd9 config.c: remove unnecessary header in minimum configuration file.
It is just silly to start the file called "config" with a
comment that says "This is the config file."

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-12-05 12:58:53 -08:00
Johannes Schindelin
ee72aeaf00 Rename git-config-set to git-repo-config
... and adjust all references.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-24 11:10:40 -08:00