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:
Johannes Schindelin
2008-08-02 21:38:56 +02:00
committed by Junio C Hamano
parent 372c767610
commit bc699afcce
4 changed files with 37 additions and 6 deletions

View File

@ -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;
}