diff options
author | Sverre Rabbelier <srabbelier@gmail.com> | 2010-03-29 11:48:24 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-31 09:37:26 -0700 |
commit | df61c8897950759bfe93c2b9d828487bcc7fbb6b (patch) | |
tree | 235227c7a08c37d6ddbc6a87a6462fa8b8fee098 /builtin | |
parent | clone: pass the remote name to remote_get (diff) | |
download | tgif-df61c8897950759bfe93c2b9d828487bcc7fbb6b.tar.xz |
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 <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/clone.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index 068d61fd33..05be999bd4 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); |