git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Using url.insteadOf in git-clone
@ 2008-06-27  9:35 Pieter de Bie
  2008-06-27 12:55 ` [PATCH 1/2] clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig Johannes Schindelin
  2008-06-27 17:11 ` Using url.insteadOf in git-clone Junio C Hamano
  0 siblings, 2 replies; 26+ messages in thread
From: Pieter de Bie @ 2008-06-27  9:35 UTC (permalink / raw)
  To: Git Mailinglist; +Cc: Daniel Barkalow, Junio C Hamano

Hi,

I sometimes use url.insteadOf to create a shortcut to a central  
repository.
For example, having something like[*1*]

[url "git://repo.or.cz/git/"]
	insteadOf = "repo:"

in my global gitconfig allows me to do a 'git fetch repo:dscho.git'.  
I'd also
like to use that with git clone :). Currently if I try that, I get

Vienna:~ pieter$ git clone repo:dscho.git
Initialize dscho/.git
Initialized empty Git repository in /Users/pieter/dscho/.git/
ssh: Error resolving hostname repo: nodename nor servname provided, or  
not known
fatal: The remote end hung up unexpectedly

Which I think comes from the fact that the global config isn't read in  
by
remote.c when running git clone.

Now, I seem to remember there was a good reason for this (both builtin- 
clone
and git-clone.sh have the same behaviour). Also, trying to quickly  
hack in
something failed for me, even though it seems like a trivial change to  
make
for someone more familiar with the code path.

Is there an easy fix for this?

- Pieter

[1] This is not really true. If I try that, I get an error:
Vienna:git pieter$ git fetch -v repo:dscho.git
fatal: I don't handle protocol 'it'

If I change the url to "ggit://.." it does work. It seems there is an  
off-by-one
error somewhere? It does work for another url.insteadOf I have in my  
global
config though..

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2008-06-30 16:48 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-27  9:35 Using url.insteadOf in git-clone Pieter de Bie
2008-06-27 12:55 ` [PATCH 1/2] clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig Johannes Schindelin
2008-06-27 12:56   ` [PATCH 2/2] clone: respect url.insteadOf setting in global configs Johannes Schindelin
2008-06-27 16:08     ` Daniel Barkalow
2008-06-29 20:12     ` Pieter de Bie
2008-06-29 21:50       ` Johannes Schindelin
2008-06-27 16:05   ` [PATCH 1/2] clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig Daniel Barkalow
2008-06-27 22:40     ` Junio C Hamano
2008-06-29 18:31       ` Daniel Barkalow
2008-06-29 20:36         ` Junio C Hamano
2008-06-29 21:49         ` Johannes Schindelin
2008-06-29 22:47           ` Daniel Barkalow
2008-06-30  0:41             ` Johannes Schindelin
2008-06-30  1:54               ` Daniel Barkalow
2008-06-30  1:20             ` Junio C Hamano
2008-06-30  2:21               ` Daniel Barkalow
2008-06-30  3:47               ` Daniel Barkalow
2008-06-30 11:57                 ` Johannes Schindelin
2008-06-30 16:47                   ` Daniel Barkalow
2008-06-30  6:20           ` Junio C Hamano
2008-06-30  6:25             ` Junio C Hamano
2008-06-30  6:40               ` Jeff King
2008-06-30  6:44                 ` Junio C Hamano
2008-06-30 11:37             ` Johannes Schindelin
2008-06-27 17:11 ` Using url.insteadOf in git-clone Junio C Hamano
2008-06-29 18:59   ` Pieter de Bie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).