clone: Add an option to set up a mirror
The command line $ git clone --mirror $URL is now a short-hand for $ git clone --bare $URL $ (cd $(basename $URL) && git remote add --mirror origin $URL) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
372c767610
commit
bc699afcce
@ -115,7 +115,7 @@ static int add(int argc, const char **argv)
|
||||
if (mirror) {
|
||||
strbuf_reset(&buf);
|
||||
strbuf_addf(&buf, "remote.%s.mirror", name);
|
||||
if (git_config_set(buf.buf, "yes"))
|
||||
if (git_config_set(buf.buf, "true"))
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user