Re: Implementing branch attributes in git config
- From
sean <seanlkml@sympatico.ca>
- Date
- May 8, 2006, 00:34 UTC
- Message-ID
- <BAYC1-PASMTP08D42DA222BA9843352CC1AEA80@CEZ.ICE>
- In-Reply-To
- <Pine.LNX.4.64.0605071629080.3718@g5.osdl.org>
On Sun, 7 May 2006 17:05:26 -0700 (PDT) Linus Torvalds <torvalds@osdl.org> wrote:
Show 11 quoted lines
> So you could have something like > > ["Origin"] > URL = ... > fetch = master > > and it would just turn it into > > branch.Origin.url = ... > branch.Origin.fetch = master >
Having magic sections that prepend "branch." seems a bit suspect; why not just be explicit:
[branch.Origin]
URL = ...
fetch = masterWouldn't it be reasonable for git to impose modest restrictions on branch names; such as restricting them to [a-zA-Z0-9] characters? Then we just have to make section names case sensitve within the config file; keys could still be case insensitive.
Actually it would be nice if we were consistent. If case matters to git then the config file should be case sensitive. If case doesn't matter to git, then it should consider "Branch", "branch" and "BrAnCh" as the same in all contexts (eg. git branch -b BrAnCh). It seems silly for us to say people are too dumb to handle case sensitivity in a config file, but it's perfectly acceptable everywhere else.
Sean