From: Junio C Hamano Date: Fri, 18 Jun 2010 18:16:53 +0000 (-0700) Subject: Merge branch 'ph/clone-message-reword' X-Git-Tag: v1.7.2-rc0~61 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fd8b005c0d5bcc91c3b5a883f72addc0e51fb38b?ds=inline;hp=-c Merge branch 'ph/clone-message-reword' * ph/clone-message-reword: clone: reword messages to match the end-user perception --- fd8b005c0d5bcc91c3b5a883f72addc0e51fb38b diff --combined builtin/clone.c index 4457922427,3a3625b2ad..efb1e6faa5 --- a/builtin/clone.c +++ b/builtin/clone.c @@@ -464,7 -464,8 +464,8 @@@ int cmd_clone(int argc, const char **ar set_git_dir(make_absolute_path(git_dir)); if (0 <= option_verbosity) - printf("Cloning into %s...\n", get_git_dir()); + printf("Cloning into %s%s...\n", + option_bare ? "bare repository " : "", dir); init_db(option_template, INIT_DB_QUIET); /* @@@ -474,6 -475,9 +475,6 @@@ */ unsetenv(CONFIG_ENVIRONMENT); - if (option_reference) - setup_reference(git_dir); - git_config(git_default_config, NULL); if (option_bare) { @@@ -499,15 -503,12 +500,15 @@@ git_config_set(key.buf, "true"); strbuf_reset(&key); } - - strbuf_addf(&key, "remote.%s.url", option_origin); - git_config_set(key.buf, repo); - strbuf_reset(&key); } + strbuf_addf(&key, "remote.%s.url", option_origin); + git_config_set(key.buf, repo); + strbuf_reset(&key); + + if (option_reference) + setup_reference(git_dir); + fetch_pattern = value.buf; refspec = parse_fetch_refspec(1, &fetch_pattern); @@@ -517,7 -518,7 +518,7 @@@ 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)