summaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorSverre Rabbelier <srabbelier@gmail.com>2010-03-29 16:48:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-31 16:37:26 (GMT)
commitdf61c8897950759bfe93c2b9d828487bcc7fbb6b (patch)
tree235227c7a08c37d6ddbc6a87a6462fa8b8fee098 /builtin/clone.c
parent766ac6a6ba26b0d58c75234bb3553178eafa80b0 (diff)
downloadgit-df61c8897950759bfe93c2b9d828487bcc7fbb6b.zip
git-df61c8897950759bfe93c2b9d828487bcc7fbb6b.tar.gz
git-df61c8897950759bfe93c2b9d828487bcc7fbb6b.tar.bz2
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/clone.c')
-rw-r--r--builtin/clone.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 068d61f..05be999 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);