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

Re: Automatically remote prune

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 4, 2009, 18:04 UTC
Message-ID
<7v639qi2un.fsf@alter.siamese.dyndns.org>
In-Reply-To
<43d8ce650911040242l44bbf87dm35494e04ce9039aa@mail.gmail.com>
John Tapsell <johnflux@gmail.com> writes:
Show 6 quoted lines
> $> git branch -r
> origin/blah1 [Deleted]
> origin/blah2
>
> (Some branches have been deleted on the remote server.  Use  "git
> remote prune origin" to remove these)

There is no information locally available to do this, unless you are willing to contact the remote every time somebody says "branch -r" (or "branch -a"). I tend to think it is not very nice for the branch command that has long been a "local" command to suddenly start talking to outside world.

You could store necessary information somewhere else when you contacted the remote the last time, but we need to consider what the benefits are to give this information in the first place.a

The [Deleted] mark in your suggestion tells the user:
    This is already removed in the remote, and this tracking copy is the
    only way for you to view it ever again.  Do not run 'remote prune
    origin' blindly otherwise you will lose it.
But that is already possible with "git remote show origin", isn't it?
Previous: John TapsellNext: John Tapsell
Message 2 of 15 in “Automatically remote prune”
  1. John TapsellNov 4, 2009
  2. Junio C HamanoNov 4, 2009
  3. John TapsellNov 5, 2009
  4. Shawn O. PearceNov 5, 2009
  5. Junio C HamanoNov 5, 2009
  6. Sitaram ChamartyNov 5, 2009
  7. John TapsellNov 5, 2009
  8. Junio C HamanoNov 5, 2009
  9. Jay SoffianNov 5, 2009
  10. Petr BaudisNov 6, 2009
  11. Jay SoffianNov 6, 2009
  12. Petr BaudisNov 6, 2009
  13. Junio C HamanoNov 8, 2009
  14. Petr BaudisNov 6, 2009
  15. Dmitry PotapovNov 5, 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.