git clone does not understand insteadOf URLs

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

git clone does not understand insteadOf URLs

From: Gioele Barabucci <hidden>
Date: 2016-06-15 22:57:27

Hello,

it seems that `git clone` does not understand keywords used `insteadOf` 
longer URLs.

     $ git clone remote-repo/ProjectA.git
     fatal repository 'remote-repo/ProjectA.git' does not exist

I suppose that git interprets the argument as a local directory. Git 
should see if the argument matches one of the known URLs before raising 
an error.

Regards,

-- 
Gioele Barabucci [off-list ref]

Re: git clone does not understand insteadOf URLs

From: Elia Pinto <hidden>
Date: 2016-06-15 22:57:27

Why someone should be do something like this ? What is the use case ?

Best regards

2013/5/25, Gioele Barabucci [off-list ref]:
Hello,

it seems that `git clone` does not understand keywords used `insteadOf`
longer URLs.

     $ git clone remote-repo/ProjectA.git
     fatal repository 'remote-repo/ProjectA.git' does not exist

I suppose that git interprets the argument as a local directory. Git
should see if the argument matches one of the known URLs before raising
an error.

Regards,

--
Gioele Barabucci [off-list ref]
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Inviato dal mio dispositivo mobile

Re: git clone does not understand insteadOf URLs

From: Gioele Barabucci <hidden>
Date: 2016-06-15 22:57:27

Il 26/05/2013 17:13, Elia Pinto ha scritto:
 >>       $ git clone remote-repo/ProjectA.git
 >>       fatal repository 'remote-repo/ProjectA.git' does not exist
 >
Why someone should be do something like this ? What is the use case ?
Simple, I keep all my projects on the same server, so I would like to 
refer to that server + path using 'remote-repo'.

"git+ssh://git.example.org//users/gioele/projects" insteadOf "remote-repo"

I also helps me when I move all the projects from one path to another in 
the remote server: I only need to change the path once in `~/.gitconfig`.

Please note that `git remote add` correctly understands 
'remote-repo/ProjectA.git'. I was expecting that `clone` and `remote` 
both used the same code to parse paths.

Regards,

-- 
Gioele Barabucci [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help