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

Re: missing tags from "git fetch"

From
Jeff King <peff@peff.net>
Date
Nov 22, 2019, 13:00 UTC
Message-ID
<20191122130020.GA22423@sigill.intra.peff.net>
In-Reply-To
<alpine.LSU.2.20.1910251150411.2754@cpza.bfz-tzou.qr>
On Fri, Oct 25, 2019 at 12:17:26PM +0200, Martin Nicolay wrote:
Show 5 quoted lines
> >  $ git fetch origin master:refs/remotes/origin/master
> 
> I thought it would work, but it works only once. On the second time the ref
> for the remote branch is deleted. It seems git is confused by specifying a
> ref it expect to manage itself.

It seems like a bad interaction with `fetch.prune` (I don't have it set, and the problem doesn't appear, but if I set it, I can reproduce your issue).

I'm not sure why, though. It's true that the ref _is_ mentioned in the configured refspec for origin, but we shouldn't be looking at that refspec at all (since we have a refspec on the command line).

-Peff
Previous: Martin Nicolay
Message 5 of 5 in “missing tags from "git fetch"”
  1. Martin NicolayOct 2, 2019
  2. Jeff KingOct 2, 2019
  3. Martin NicolayOct 2, 2019
  4. Martin NicolayOct 25, 2019
  5. Jeff KingNov 22, 2019

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.