git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Feature Request: `git remote prune --all`
@ 2014-08-17  0:52 Travis Carden
  2014-08-17  7:18 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Travis Carden @ 2014-08-17  0:52 UTC (permalink / raw)
  To: git

I would like to propose the addition of a `git remote prune --all`
command option or similar mechanism for pruning all remotes in a
repository. For lack of such a feature, I've been using the following
bash alias:

alias git-remote-prune-all='for REMOTE in `git remote`; do echo
"Pruning $REMOTE"; git remote prune $REMOTE; done;'

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Feature Request: `git remote prune --all`
  2014-08-17  0:52 Feature Request: `git remote prune --all` Travis Carden
@ 2014-08-17  7:18 ` Jeff King
  2014-08-18  5:56   ` Travis Carden
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2014-08-17  7:18 UTC (permalink / raw)
  To: Travis Carden; +Cc: git

On Sat, Aug 16, 2014 at 07:52:44PM -0500, Travis Carden wrote:

> I would like to propose the addition of a `git remote prune --all`
> command option or similar mechanism for pruning all remotes in a
> repository. For lack of such a feature, I've been using the following
> bash alias:
> 
> alias git-remote-prune-all='for REMOTE in `git remote`; do echo
> "Pruning $REMOTE"; git remote prune $REMOTE; done;'

I think in general we've been moving "git remote" away from actually
interacting with the other side, and pushing those features into "git
fetch". These days you can use "git fetch --prune --all" to do what you
want.

Note that this isn't _exactly_ the same thing. Fetch's prune will do a
normal fetch and _also_ prune. There is no way to say "just prune, but
do not update existing refs". If that detail is important, I think I'd
rather see the feature go the other way from your request: teach
git-fetch a "--prune-only" mode.

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Feature Request: `git remote prune --all`
  2014-08-17  7:18 ` Jeff King
@ 2014-08-18  5:56   ` Travis Carden
  0 siblings, 0 replies; 3+ messages in thread
From: Travis Carden @ 2014-08-18  5:56 UTC (permalink / raw)
  To: Jeff King, Kyle J. McKay; +Cc: git

Thanks, guys! `git fetch --all --prune` satisfies my request. I
appreciate the education!

On Sun, Aug 17, 2014 at 2:18 AM, Jeff King <peff@peff.net> wrote:
> On Sat, Aug 16, 2014 at 07:52:44PM -0500, Travis Carden wrote:
>
>> I would like to propose the addition of a `git remote prune --all`
>> command option or similar mechanism for pruning all remotes in a
>> repository. For lack of such a feature, I've been using the following
>> bash alias:
>>
>> alias git-remote-prune-all='for REMOTE in `git remote`; do echo
>> "Pruning $REMOTE"; git remote prune $REMOTE; done;'
>
> I think in general we've been moving "git remote" away from actually
> interacting with the other side, and pushing those features into "git
> fetch". These days you can use "git fetch --prune --all" to do what you
> want.
>
> Note that this isn't _exactly_ the same thing. Fetch's prune will do a
> normal fetch and _also_ prune. There is no way to say "just prune, but
> do not update existing refs". If that detail is important, I think I'd
> rather see the feature go the other way from your request: teach
> git-fetch a "--prune-only" mode.
>
> -Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-18  5:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-17  0:52 Feature Request: `git remote prune --all` Travis Carden
2014-08-17  7:18 ` Jeff King
2014-08-18  5:56   ` Travis Carden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).