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

Re: mirror clone does not keep HEAD updated

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 5, 2023, 01:56 UTC
Message-ID
<CAMP44s1DrFY7ZxfdFwVDd=uJpdxkEDf8irAzEKmcih2MEuv0Aw@mail.gmail.com>
In-Reply-To
<xmqqileb1u34.fsf@gitster.g>
On Tue, Apr 4, 2023 at 12:07 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
>
> Daniel Martí <mvdan@mvdan.cc> writes:
>
> > I'm testing `git clone --mirror` to properly mirror a repository on
> > github.com. It appears to be working well, except for keeping HEAD
> > correctly in place.
>
> There is no such feature in "git clone" or "git fetch" to check what
> branch the remote HEAD is pointing at and move the local copy around.
Only because you didn't merge the patches I sent a while ago [1].
Show 5 quoted lines
> Modern versions of Git these days have a protocol level support to
> convey that information, and I think it is feasible to invent such a
> feature to automatically repoint refs/remotes/$remote/HEAD to
> whatever remote-tracking branch found in the refs/remotes/$remote/
> hierarchy.
Or just repoint it to the remote's HEAD, which is what everyone expects.
> We are pretty much "somebody should initiate the process to scratch
> their own itch, and we will help them in doing so" community, so you
> or somebody who reads this thread interesting will hopefully start
> such an effort ;-)

That has not been my experience. Even when I scratch somebody else's itch, there is not much help, and the patches don't end up being merged.

Cheers.
[1] https://lore.kernel.org/git/20201118091219.3341585-1-felipe.contreras@gmail.com/
-- 
Felipe Contreras
Previous: Junio C HamanoNext: Felipe Contreras
Message 3 of 4 in “mirror clone does not keep HEAD updated”
  1. Daniel MartíApr 4, 2023
  2. Junio C HamanoApr 4, 2023
  3. Felipe ContrerasApr 5, 2023
  4. Felipe ContrerasApr 5, 2023

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.