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

Bug in git remote prune?

From
Jay Soffian <jaysoffian@gmail.com>
Date
Nov 6, 2009, 00:34 UTC
Message-ID
<76718490911051634w2d364b73m567e73039508c857@mail.gmail.com>
Let's say you've got the following tracking branches:

refs/remotes/origin/master refs/remotes/origin/next refs/remotes/origin/ghost

And origin has only "master" and "next" (ghost has been removed upstream).
Further, let's say you've got a refspec of:
[remote "origin"]
  fetch = +refs/heads/master:refs/remotes/origin/master
What should "git remote prune origin" do?

In my opinion, it should prune "next" and "ghost". "ghost" is gone from upstream, so that's obvious. I think "next" should also be pruned because the refspec indicates the user is no longer interested in it.

Currently it doesn't do anything (it only considers "master" per the refspec, which is still on origin, so it doesn't think there is anything to prune).

Thoughts?
j.
Next: Junio C Hamano
Message 1 of 3 in “Bug in git remote prune?”
  1. Jay SoffianNov 6, 2009
  2. Junio C HamanoNov 6, 2009
  3. Jay SoffianNov 6, 2009

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.