summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ac749c)
raw | patch | inline | side by side (parent: 7ac749c)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Fri, 27 Jun 2008 12:56:05 +0000 (13:56 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 27 Jun 2008 23:21:19 +0000 (16:21 -0700) |
When we call "git clone" with a url that has a rewrite rule in either
$HOME/.gitconfig or /etc/gitconfig, the URL can be different from
what the command line expects it to be.
So, let's use the URL as the remote structure has it, not the literal
string from the command line.
Noticed by Pieter de Bie.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
$HOME/.gitconfig or /etc/gitconfig, the URL can be different from
what the command line expects it to be.
So, let's use the URL as the remote structure has it, not the literal
string from the command line.
Noticed by Pieter de Bie.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-clone.c | patch | blob | history |
diff --git a/builtin-clone.c b/builtin-clone.c
index b2dfe1ab5c6df0da0af0004bdf5accd6d37a90d8..9c028e76a56b32a817ae4c9f72ed8b2aa064f43f 100644 (file)
--- a/builtin-clone.c
+++ b/builtin-clone.c
refs = clone_local(path, git_dir);
else {
struct remote *remote = remote_get(argv[0]);
- struct transport *transport = transport_get(remote, argv[0]);
+ struct transport *transport =
+ transport_get(remote, remote->url[0]);
if (!transport->get_refs_list || !transport->fetch)
die("Don't know how to clone %s", transport->url);