From df61c8897950759bfe93c2b9d828487bcc7fbb6b Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Mon, 29 Mar 2010 11:48:24 -0500 Subject: [PATCH] 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 --- builtin/clone.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); -- 2.26.2