Re: [PATCH 1/2] Allow '-' in config variable names

From: Junio C Hamano <junkio@cox.net>
Date: 2006-10-31 14:02:27
Junio C Hamano <junkio@cox.net> writes:

> Linus Torvalds <torvalds@osdl.org> writes:
>
>> I need this in order to allow aliases of the same form as "ls-tree", 
>> "rev-parse" etc, so that I can use
>>
>> 	[alias]
>> 		my-cat=--paginate cat-file -p
>>
>> to add a "git my-cat" command.
>
> I do not have problem with this (and would perhaps also want to
> add '_' to keychar set), but people who envisioned parsing
> config from scripts (i.e. Perly git) might prefer if we stayed
> within alnum, since I'd suspect then they may be able to reuse
> existing .ini parsers.  I do not much care about that myself,
> but I am bringing it up just in case other people might.
>
> Other than that, this sounds nice.

One thing I forgot to add.  Just like we downcase what user has
written in config file, it might make sense to also remove '-'
(and if we add '_' to keychar set, that one as well) to when
canonicalizing the key value.  That way, somewhat awkward long
configuration variables we currently have can be written more
readably, e.g. repack.use-delta-base-offset

Likes, dislikes?  It is not strictly needed, since we can do
CamelCase as well in the configuration file.

> By the way, everybody seems to do "alias.xxx = -p cat-file -p"
> (I have it as "git less").  Maybe we would want to make a
> built-in alias for that?

Seconds?

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Oct 31 14:02:35 2006

This archive was generated by hypermail 2.1.8 : 2006-10-31 14:03:31 EST