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

Re: Cloning a custom refspec does not work as expected

From
Jeff King <peff@peff.net>
Date
May 3, 2017, 20:03 UTC
Message-ID
<20170503200345.mjxvcv4o4wce3ddr@sigill.intra.peff.net>
In-Reply-To
<CAHGBnuMUrNFv30d+pjheiCAikM89XshQTFuDXBzu+EcxNY_94w@mail.gmail.com>
On Wed, May 03, 2017 at 02:16:47PM +0200, Sebastian Schuberth wrote:
Show 15 quoted lines
> I'd assume that this would work:
> 
> $ git clone -c remote.origin.fetch=+refs/changes/*:refs/remotes/origin/changes/*
> https://gerrit.googlesource.com/git-repo
> 
> In fact, this *does* add the custom refs correct to .git/config, but
> they are not fetched during the clone. I can manually fix that by
> doing
> 
> $ cd git-repo
> $ git fetch
> 
> afterwards, but the whole point is to avoid exactly that separate step.
> 
> Is this a code bug or documentation bug?
I think it's a code bug. More discussion in:
  http://public-inbox.org/git/robbat2-20170225T185056-448272755Z@orbis-terrarum.net/
-Peff
Previous: Stefan Beller
Message 3 of 3 in “Cloning a custom refspec does not work as expected”
  1. Sebastian SchuberthMay 3, 2017
  2. Stefan BellerMay 3, 2017
  3. Jeff KingMay 3, 2017

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.