mirror of
https://github.com/git/git
synced 2024-09-13 21:34:42 +00:00
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>
This commit is contained in:
parent
766ac6a6ba
commit
df61c88979
|
@ -495,11 +495,11 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
|
||||||
git_config_set(key.buf, "true");
|
git_config_set(key.buf, "true");
|
||||||
strbuf_reset(&key);
|
strbuf_reset(&key);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
strbuf_addf(&key, "remote.%s.url", option_origin);
|
strbuf_addf(&key, "remote.%s.url", option_origin);
|
||||||
git_config_set(key.buf, repo);
|
git_config_set(key.buf, repo);
|
||||||
strbuf_reset(&key);
|
strbuf_reset(&key);
|
||||||
}
|
|
||||||
|
|
||||||
if (option_reference)
|
if (option_reference)
|
||||||
setup_reference(git_dir);
|
setup_reference(git_dir);
|
||||||
|
|
Loading…
Reference in a new issue