Re: [PATCH 2/2] git-fetch: use fetch--tool pick-rref to avoid local fetch from alternate
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Apr 5, 2007, 16:15 UTC
- Message-ID
- <20070405161537.GJ5436@spearce.org>
- In-Reply-To
- <7v1wizrugw.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
> + # This will barf when $theirs reach an object that > + # we do not have in our repository. Otherwise, > + # we already have everything the fetch would bring in. > + git-rev-list --objects $theirs --not --all 2>/dev/null
OK, I must be missing something here.
That rev-list is going to print out the SHA-1s for the objects we would have copied, but didn't, isn't it? So fetch--tool native-store is going to get a whole lot of SHA-1s it doesn't want to see, right?
Otherwise this is a nice trick. It doesn't assure us that after the fetch those objects are still in the alternate. Meaning someone could run prune in the alternate between the rev-list and the native-store, and whack these objects. Given how small of a window it is, and the improvements this brings to alternates, I say its worth that small downside. Just don't prune while fetching. ;-)
-- Shawn.