git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] clone: Add an option to set up a mirror

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 2, 2008, 18:55 UTC
Message-ID
<7vr697l01j.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0808011600170.9611@pacific.mpi-cbg.de.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 8 quoted lines
> 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)

I think this would be a useful behaviour and I am very tempted to violate the general policy of not taking any new options nor features after -rc1.

I however notice that there are differences bewteen the above sequence and what your code actually does:

 - The "remote add --mirror" sequence tells it to mirror everything, but
   the patch still mirrors only heads;
 - You are not setting up "remote.*.mirror = yes" in the configuration;
Previous: Miklos VajnaNext: Johannes Schindelin
Message 6 of 9 in “clone: Add an option to set up a mirror”
  1. 1/2 clone: Add an option to set up a mirrorJohannes Schindelin, Aug 1, 2008
  2. 2/2 clone --bare: Add ".git" suffix to the directory name to clone intoJohannes Schindelin, Aug 1, 2008
  3. Marcus GriepAug 1, 2008
  4. Bert WesargAug 1, 2008
  5. Miklos VajnaAug 1, 2008
  6. Junio C HamanoAug 2, 2008
  7. clone: Add an option to set up a mirrorJohannes Schindelin, Aug 2, 2008
  8. Johannes SchindelinAug 2, 2008
  9. Junio C HamanoAug 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.