Re: Implementing branch attributes in git config
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- May 9, 2006, 00:37 UTC
- Message-ID
- <Pine.LNX.4.64.0605081731440.3718@g5.osdl.org>
- In-Reply-To
- <BAYC1-PASMTP03ADC2F3E75E482ADC5CD3AEA90@CEZ.ICE>
On Mon, 8 May 2006, sean wrote:
Show 8 quoted lines
> > One option, which I don't really like and comes with its own set of > problems, would be to do something like: > > [branch1] > streetname = "p4/BrAnCH" > [branch2] > streetname = "origin"
You don't actually need that.
We could easily do
[branch] name = "p4/BrAnCH" url = git://git.kernel.org/... pull = master
; ; Repeating the "[branch]" section here isn't ; needed, but doesn't hurt either, and is ; more readable ; [branch] name = "origin" url = ... pull = ...
because the config file is always parsed linearly, and just trigger on "branch.name", and keep that around when parsing anything else.
The problem with _that_ is that "git repo-config" can't add this kind of setup sanely: it doesn't understand that kind of statefulness.
The above would work without any changes what-so-ever to the config format and readers - and old versions of git wouldn't react badly either. But the writer would need to be taught about state.
Linus