Re: [RFC 1/2] Use remote information in .git/config
- From
Petr Baudis <pasky@suse.cz>
- Date
- Nov 27, 2005, 12:52 UTC
- Message-ID
- <20051127125256.GC22159@pasky.or.cz>
- In-Reply-To
- <Pine.LNX.4.63.0511250208110.28437@wbgn013.biozentrum.uni-wuerzburg.de>
Dear diary, on Fri, Nov 25, 2005 at 02:08:46AM CET, I got a letter where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
Show 16 quoted lines
> On Fri, 25 Nov 2005, Ben Clifford wrote: > > > On 22 Nov 2005, at 05:29, Junio C Hamano wrote: > > > > > Personally I do not mind moving remotes/branches information > > > there, except that I suspect the git-config-set interface makes > > > it cumbersome to (1) find out what remotes I defined (i.e. an > > > equivalent of "ls .git/remotes") > > > > (1) is useful to be able to do in a very lightweight way when doing tab > > completion on remotes. Having heads, tags, remotes in nicely named separate > > files makes that pretty straightforward; I don't know if using a git-config- > > accessor would make this noticeably worse, though, as I haven't tried anything > > out there yet. > > git-var -l | sed -n "s/^remote\.\([A-Za-z0-9]*\)\.url=.*$/\1/p"
All right, I've asked about this functionality in the other thread, and something like this seems to cut it (although I would just /\([^.=]*\)/ instead of restricting the remote name).
However, it's a nice example of horrible interface. And confusing one at it, too.
Why git-var -l?! That makes no sense to me. git-var's function is to "print the git users identity" (no matter that it is grammatically wrong, that's what the synopsis says). This is something totally else, and I can't see what bussiness does this have in the git-var command. This should belong into git-repo-config, which manages the rest of the config-related stuff.
C'mon people, git's interface is inconsistent enough as it is now, no need to make it even worse. ;-)
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ VI has two modes: the one in which it beeps and the one in which it doesn't.