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,12 +495,12 @@ 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);
|
|
||||||
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)
|
if (option_reference)
|
||||||
setup_reference(git_dir);
|
setup_reference(git_dir);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user