From: Sverre Rabbelier Date: Mon, 29 Mar 2010 16:48:24 +0000 (-0500) Subject: clone: also configure url for bare clones X-Git-Tag: v1.7.2-rc0~128^2~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=df61c8897950759bfe93c2b9d828487bcc7fbb6b;p=git.git clone: also configure url for bare clones 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 --- diff --git a/builtin/clone.c b/builtin/clone.c index 068d61fd3..05be999bd 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -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);