From: "Shawn O. Pearce" <spearce@spearce.org>
To: Kevin Green <Kevin.T.Green@morganstanley.com>
Cc: Peter Harris <git@peter.is-a-geek.org>, git@vger.kernel.org
Subject: Re: keeping remote branches in sync
Date: Thu, 9 Oct 2008 08:46:37 -0700 [thread overview]
Message-ID: <20081009154637.GV8203@spearce.org> (raw)
In-Reply-To: <20081009153738.GJ18241@morganstanley.com>
Kevin Green <Kevin.T.Green@morganstanley.com> wrote:
> On 10/09/08 11:16:36, Shawn O. Pearce wrote:
> > I keep meaning to add "git remote prune" logic into "git fetch",
> > e.g. as a "git fetch --prune" option. fetch has all of the data
> > it needs to implement the prune already in memory, it just doesn't
> > have the loop to do the prune cleanup.
> >
> > Now that "git remote" is in C it should be easy to share the prune
> > code between them, and make this more automatic.
>
> That would be great... And a config option to have it done by default each
> time so '$ git-pull' will just do what we want for our origin remote?
Right. I think most users would want to set that config option.
git-gui has a config option to enable this prune after fetch
behavior, but its basically just calling "git remote prune" when
fetch is done running.
I think can also work around it with an alias:
git config --alias fp \
'! git fetch "$0" "$@" && git remote prune "$0"'
Not bullet proof but it should do the prune for you after it does
the fetch, assuming you fetched from an existing remote and not a
random URL.
--
Shawn.
prev parent reply other threads:[~2008-10-09 15:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 14:14 keeping remote branches in sync Kevin Green
2008-10-09 14:43 ` Peter Harris
2008-10-09 15:16 ` Shawn O. Pearce
2008-10-09 15:37 ` Kevin Green
2008-10-09 15:46 ` Shawn O. Pearce [this message]
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=20081009154637.GV8203@spearce.org \
--to=spearce@spearce.org \
--cc=Kevin.T.Green@morganstanley.com \
--cc=git@peter.is-a-geek.org \
--cc=git@vger.kernel.org \
/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 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).