manpages: fix bogus whitespace
[gitweb.git] / builtin-clone.c
index f13845fb7f0c4b3759a3055fdfe216f83d18f957..643c7d41697868456c94f879bd3357b91744f4db 100644 (file)
@@ -424,6 +424,13 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        fprintf(stderr, "Initialize %s\n", git_dir);
        init_db(option_template, option_quiet ? INIT_DB_QUIET : 0);
 
+       /*
+        * At this point, the config exists, so we do not need the
+        * environment variable.  We actually need to unset it, too, to
+        * re-enable parsing of the global configs.
+        */
+       unsetenv(CONFIG_ENVIRONMENT);
+
        if (option_reference)
                setup_reference(git_dir);
 
@@ -456,7 +463,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                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);