Re: Implementing branch attributes in git config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus Torvalds <torvalds@xxxxxxxx> writes:

> On Mon, 8 May 2006, Junio C Hamano wrote:
>> 
>> Wait a minute...  Statefulness is not the issue, I think.
>
> Well, it does end up being..

Not really, you ended up making it so, perhaps, but I do not
think it needs to be.

You dodged my comments on the SQL-like queries ;-).  I was half
(perhaps 3/4) joking, but some people actually might like to be
able to say:

	git repo-config --get-all branch.name where url like 'git://%'

to list all the repositories reachable via git-native protocol.

Oops, by the way, why does a [branch] have url as its attribute?
I think this was a bad example -- we are talking about [remote]
here.  But the main point is about syntax, so that is OK.

> Exactly, git repo-config would have to know about this magic thing, and 
> have a special argument like
>
> 	--state=branch.name
>
> that says that "state" is to be taken from the "branch.name" variable when 
> seen.
>
> Then, in addition to the regexp, you would have a way to trigger on the 
> "state" variable.

I am reluctant to buy that argument (I see it is an easy way
from the implementation point of view) -- it appears to me that
it would invite this easy user error.


	[branch]
        	name = linus
        	url = git://git.kernel.org/../torvalds/linux-2.6

	[branch]
        	url = git://git.kernel.org/../jgarzik/libata-dev
        	name = libata

> It would be _able_ to do all the same things, but thanks to statefulness 
> you'd be able to keep the section (and key) names the way they are.

Yes, but that statefulness is inviting user errors, and you need
to update repo-config and config parser anyway, so I still do
not see what the advantage is.

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]