public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Michael Haggerty <mhagger@alum•mit.edu>
Cc: "Jeff King" <peff@peff•net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail•com>,
	"Stefan Beller" <sbeller@google•com>,
	"Git Mailing List" <git@vger•kernel.org>,
	"Jay Soffian" <jaysoffian@gmail•com>,
	"Björn Gustavsson" <bgustavsson@gmail•com>
Subject: Re: Why is "git fetch --prune" so much slower than "git remote prune"?
Date: Thu, 19 Mar 2015 12:24:21 -0700	[thread overview]
Message-ID: <xmqqpp84iye2.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <550AE1E4.7020407@alum.mit.edu> (Michael Haggerty's message of "Thu, 19 Mar 2015 15:49:08 +0100")

Michael Haggerty <mhagger@alum•mit.edu> writes:

>> Now that we have ref_transaction_*, I think if git-fetch fed all of the
>> deletes (along with the updates) into a single transaction, we would get
>> the same optimization for free. Maybe that is even part of some of the
>> pending ref_transaction work from Stefan or Michael (both cc'd). I
>> haven't kept up very well with what is cooking in pu.
>
> I am looking into this now.
>
> For pruning, we can't use a ref_transaction as it is currently
> implemented because it would fail if any of the reference deletions
> failed. But in this case I think if any deletions fail, we would prefer
> to emit a warning but keep going.

I am not quite sure what you mean here.  I agree with you if you
meant "we shouldn't fail the fetch only because 'fetch --prune'
failed to remove only one of the remote-tracking refs that are no
longer there" but that can easily be solved by the pruning phase
into a separate transaction.  If you meant "we would rather remove
origin/{a,b} non-atomically when we noticed that origin/{a,b,c} are
all gone than leaving all three intact only because we failed to
remove origin/c for whatever reason", my knee-jerk reaction is "does
it make practical difference to the end user between these two?"

What are the plausible cause of failing to prune unused
remote-tracking refs?

  parent reply	other threads:[~2015-03-19 19:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06 16:48 Why is "git fetch --prune" so much slower than "git remote prune"? Ævar Arnfjörð Bjarmason
2015-03-06 22:59 ` Jeff King
2015-03-19 14:49   ` Michael Haggerty
2015-03-19 17:14     ` Jeff King
2015-03-19 19:24     ` Junio C Hamano [this message]
2015-03-19 21:26       ` Jeff King
2015-03-20  4:51       ` Michael Haggerty
2015-03-20  7:04         ` Junio C Hamano

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=xmqqpp84iye2.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=avarab@gmail$(echo .)com \
    --cc=bgustavsson@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jaysoffian@gmail$(echo .)com \
    --cc=mhagger@alum$(echo .)mit.edu \
    --cc=peff@peff$(echo .)net \
    --cc=sbeller@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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