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

Re: [PATCH] git-remote: make remote name optional for prune operation

From
Finn Arne Gangstad <finnag@pvv.org>
Date
May 6, 2009, 17:55 UTC
Message-ID
<20090506175500.GA19976@pvv.org>
In-Reply-To
<7vab5qw3nr.fsf@alter.siamese.dyndns.org>
On Wed, May 06, 2009 at 10:18:48AM -0700, Junio C Hamano wrote:
Show 35 quoted lines
> Julien Danjou <julien@danjou.info> writes:
> 
> > We consider that if `git remote prune` is called without a name, we
> > actually want to prune all remotes.
> 
> I think we try to make an opearation that discards information from many
> things at once by mistake, and it feels that this patch goes against it.
> 
> In what situation does this new short-cut make things convenient, and how
> often does such a situation come up?  The only one I can think of is when
> you are interacting with many volatile remotes that create and delete
> branches all the time, and when you are trying to repack/pack-ref your
> local repository with as much cruft removed, but in such a set-up, next
> time you interact with your remotes, you will get their "branch of the
> day" in your remote tracking namespace that will disappear shortly, and it
> does not sound like it is such a big deal if you did not run "remote
> prune" to all of them at once anyway.
> 
> Having said all that...
> 
> > diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
> > index 9e2b4ea..c566061 100644
> > --- a/Documentation/git-remote.txt
> > +++ b/Documentation/git-remote.txt
> > @@ -15,7 +15,7 @@ SYNOPSIS
> >  'git remote rm' <name>
> >  'git remote set-head' <name> [-a | -d | <branch>]
> >  'git remote show' [-n] <name>
> > -'git remote prune' [-n | --dry-run] <name>
> > +'git remote prune' [-n | --dry-run] [name]
> >  'git remote update' [-p | --prune] [group | remote]...
> 
> I think you would want to say [<name>] here, but looking at this list, I
> wonder if it would be more appropriate to allow "remote group" to be given
> to "prune" (and perhaps "show").

I also think that if we want to change prune, we should change it to interpret its parameters identically to update. This means that no argument will not expand to "all remotes", but rather to the possibly configured "default" group.

In other words: I think "git remote update -p" and "git remote prune" should prune the same remotes (both with and without additional arguments).

- Finn Arne
Previous: Junio C Hamano
Message 9 of 9 in “git-remote: make remote name optional for prune operation”
  1. git-remote: make remote name optional for prune operationJulien Danjou, May 6, 2009
  2. Francis GaliegueMay 6, 2009
  3. Julien DanjouMay 6, 2009
  4. Jacob HelwigMay 6, 2009
  5. Michael J GruberMay 6, 2009
  6. git-remote: make remote name optional for prune operationJulien Danjou, May 6, 2009
  7. Junio C HamanoMay 6, 2009
  8. Junio C HamanoMay 6, 2009
  9. Finn Arne GangstadMay 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.