diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-07-02 21:32:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-02 21:32:44 -0700 |
commit | 182c5afa6c00eb8b773fc062bfd2c29f27ea546b (patch) | |
tree | 5c72f2fe6f0b8b593eb4d297a0c5df301b25db7f | |
parent | Merge branch 'jk/maint-fetch-ref-hier' into maint (diff) | |
parent | clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig (diff) | |
download | tgif-182c5afa6c00eb8b773fc062bfd2c29f27ea546b.tar.xz |
Merge branch 'js/maint-clone-insteadof' into maint
* js/maint-clone-insteadof:
clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
clone: respect url.insteadOf setting in global configs
-rw-r--r-- | builtin-clone.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/builtin-clone.c b/builtin-clone.c index b2dfe1ab5c..e9ecb5d21a 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -420,6 +420,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); @@ -452,7 +459,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); |