From: Sverre Rabbelier Date: Sun, 21 Mar 2010 20:19:49 GMT Subject: [PATCH 2/2] clone: pass the remote name to remote_get Message-ID: <1269202789-8833-2-git-send-email-srabbelier@gmail.com> In-Reply-To: <1269202789-8833-1-git-send-email-srabbelier@gmail.com> Currently when using a remote helper to clone a repository, the remote helper will be passed the url of the target repository as first argument (which represents the name of the remote). This name is extracted from transport->remote->name, which is set by builtin/clone.c when it calls remote_get with argv[0] as argument. Fix this by passing the name remote will be set up as instead. --- I've spent quite a few hours trying to figure out why this broke t5700, so I would appreciate feedback from those with more knowledge about hardlinking and clone/fetch in general as to whether this couild cause any problems. builtin/clone.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index f878563..068d61f 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -513,7 +513,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) refs = clone_local(path, git_dir); mapped_refs = wanted_peer_refs(refs, refspec); } else { - struct remote *remote = remote_get(argv[0]); + struct remote *remote = remote_get(option_origin); transport = transport_get(remote, remote->url[0]); if (!transport->get_refs_list || !transport->fetch) -- 1.7.0.2.325.g634e5