All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Travis Carden <travis.carden@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Feature Request: `git remote prune --all`
Date: Sun, 17 Aug 2014 03:18:05 -0400	[thread overview]
Message-ID: <20140817071805.GC23808@peff.net> (raw)
In-Reply-To: <CAByVDef1_7x8Q1SL5wMtrKJQE51gvEOiKJ4xkpexXN5omBDn-Q@mail.gmail.com>

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

  reply	other threads:[~2014-08-17  7:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-17  0:52 Feature Request: `git remote prune --all` Travis Carden
2014-08-17  7:18 ` Jeff King [this message]
2014-08-18  5:56   ` Travis Carden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140817071805.GC23808@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=travis.carden@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.