Hi guys,
I tried to use url.insteadof to get URLs mapped correctly, starting with a
double-slash (//). Unfortunately, Git doesn't recognize that and still tries to
connect to the original URL. I am using Git in a productive environment. On
Windows desktops, MsysGit 1.7.11 and 1.8.0. On ubuntu clients Git 1.7.9.0 (as
delivered with the distro).
Problem is, that we have lots and lots of submodules, with URLs like
//thegitserver/.../therepo.git. Now I'd like to checkout on the Ubuntu machine
for the CI system. Should not be much of a preblem - well, in theory.
Let's replace the windows url's (//someserver/repo.git) with a mounted CIFS
path (/media/samba_share/repo.git). On MsysGit this works as long as the server
is reachable. On Ubuntu it completely doesn't work. All comes down to the
url-alias, which seems not to be replaced correctly when using windows
double-slash url's.
I'd like to give some more samples to show what's happening:
To access cross-plattform file systems I mounted the windows share via samba
(e.g. on /media/samba_share). This works fine and we are able to clone the main
repositories by using:
$ git clone /media/samba_share/repo.git
Now let's get the submodules:
$ git submodule init -> writes the "wrong" //thegitserver/... URLs in the
config.
$ git submodule update -> fails because of the CIFS double-slash url's.
What to do? Simply define a "url.insteadof" alias
[url "/media/samba_share"]
insteadof = //thegitserver
Uh, oh. Doesn't help.
The following would work like expected, but is not usable for my case. I would
have to rewrite all URLs, what I don't want to do (maybe in the future):
[url "/media/samba_share"]
insteadof = file:////serverurl
On MsysGit, replacing the double-slash works, as long as the URL is reachable
(meaning the server has to be online). Otherwise it behaves the same like Linux.
Sample error Message:
fatal: repository '//thegitserver/.../repository.git' does not exist
The URL should be: /media/samba_share/.../repository.git
This seems to be the only case. Other URLs work like expected.
Seems like this is a bug in Git. Or did I miss something?
Please help!
Cheers,
Nils
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html