]> git.ipfire.org Git - thirdparty/git.git/commitdiff
clone: also configure url for bare clones
authorSverre Rabbelier <srabbelier@gmail.com>
Mon, 29 Mar 2010 16:48:24 +0000 (11:48 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 31 Mar 2010 16:37:26 +0000 (09:37 -0700)
Without this the 'origin' remote would not be configured, so when
calling remote_get with 'origin' as argument we would get an
unconfigured remote.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c

index 068d61fd33a00ec867d3e526c1f44ae3a3b3aa43..05be999bd4bee572826652c1cd6eafd61dc873f1 100644 (file)
@@ -495,12 +495,12 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                        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);