Merge branch 'ph/clone-message-reword'
authorJunio C Hamano <gitster@pobox.com>
Fri, 18 Jun 2010 18:16:53 +0000 (11:16 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Jun 2010 18:16:53 +0000 (11:16 -0700)
* ph/clone-message-reword:
clone: reword messages to match the end-user perception

1  2 
builtin/clone.c
diff --combined builtin/clone.c
index 44579224270c194a0ab4a90280515ec55e3b6842,3a3625b2ad97472c8486c9fbdd4ac6333699a37d..efb1e6faa539935de0e9dc590237185a1d222322
@@@ -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);
  
        /*
         */
        unsetenv(CONFIG_ENVIRONMENT);
  
 -      if (option_reference)
 -              setup_reference(git_dir);
 -
        git_config(git_default_config, NULL);
  
        if (option_bare) {
                        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);
  
                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)