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

Re: [PATCH] git remote update: New option --prune (-p)

From
Ddemerphq <demerphq@gmail.com>
Date
Apr 2, 2009, 14:17 UTC
Message-ID
<9b18b3110904020717h3a0d4b34h7f4b2b83527e6743@mail.gmail.com>
In-Reply-To
<20090402134414.GB26699@coredump.intra.peff.net>
2009/4/2 Jeff King <peff@peff.net>:
Show 15 quoted lines
> On Thu, Apr 02, 2009 at 03:34:15PM +0200, demerphq wrote:
>
>> But one question. It seem to me odd to put this as an option to git
>> remote update, and not git remote prune.
>>
>> I mean, it seems weird that one must say:
>>
>>    git remote update --prune
>>
>> and one cannot say:
>>
>>    git remote prune --all
>
> But "git remote update" actually respects "remote groups", so it is not
> just "--all". I think what you want is "git remote prune <group>".

Are there any implicit groups defined, like "all-remotes" or something? It seems less than desirable to have to define such a group for an operation that IMO is pretty reasonable to expect to happen regularly.

I personally haven't found any use for defining remote groups yet to be honest. Its a granularity of operation that hasnt served much purpose for me yet. Although i could see it being useful in the future.

Generally tho I either want to update and prune one remote only, with
   git fetch $remote; git prune $remote,
or i want to update and prune all with something like:
  git remote update; for r in $(git remote); do git remote prune $r; done;

This patch makes the latter better huffman encoded, but I'd kind of expect both to be doable as single commands in terms of how often I want to do them.

Maybe git fetch --prune would be a nice complement to this patch.
Show 8 quoted lines
>> especially when there is a `git remote prune` already. It seems a bit
>> counterintuitive to find pruning actions under "update", but not all
>> that strange to find an all "--all" option for the "prune" action.
>
> I think it makes sense under update as pruning is really just a
> different (and perhaps slightly more dangerous) form of update.
> Generally I would only want to run prune after having run update, so
> combining them makes sense from a workflow perspective.
Yeah, conceptually they approach the same point from different angles.
Show 5 quoted lines
>
>> Although to me having both be allowed and mean the same thing also
>> makes sense.
>
> I think that would make sense, too.
And the solution that presents the least surprise to the most users.
Yves
-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
Previous: Jeff KingNext: Jeff King
Message 4 of 15 in “git remote update: New option --prune (-p)”
  1. git remote update: New option --prune (-p)Finn Arne Gangstad, Apr 2, 2009
  2. demerphqApr 2, 2009
  3. Jeff KingApr 2, 2009
  4. demerphqApr 2, 2009
  5. Jeff KingApr 2, 2009
  6. demerphqApr 2, 2009
  7. Jeff KingApr 2, 2009
  8. demerphqApr 2, 2009
  9. Junio C HamanoApr 2, 2009
  10. Finn Arne GangstadApr 2, 2009
  11. Junio C HamanoApr 2, 2009
  12. 0/2 git remote update: New option --prune (-p)Finn Arne Gangstad, Apr 3, 2009
  13. 1/2 builtin-remote.c: Split out prune_remote as a separate function.Finn Arne Gangstad, Apr 3, 2009
  14. 2/2 git remote update: New option --pruneFinn Arne Gangstad, Apr 3, 2009
  15. Junio C HamanoApr 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.