Re: [RFC PATCH] index-pack: improve performance on NFS
- Date: Sat, 27 Oct 2018 16:26:50 +0900
- From: Junio C Hamano <gitster@xxxxxxxxx>
- Subject: Re: [RFC PATCH] index-pack: improve performance on NFS
Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:
> But as Junio notes the devil's in the details, another one I thought of
> GIT_OBJECT_DIRECTORY=/some/other/repository git clone ...
> It seems to me that ...
Actually I take all of that back ;-)
For the purpose of this patch, use of existing .cloning field in the
transport is fine, as the sole existing user of the field wants the
field to mean "Are we starting with an empty object store?", and not
"Are we running the command whose name is 'git clone'?".
Now, the logic used to set the field to true may have room to be
improved. We should do that as a separte and orthogonal effort so
that the two cases I mentioned plus the new one(s) you brought up
would also be taken into account, so that we can set the .cloning
field more accurately to suite the two callers' needs---one caller
is the age-old one added by beea4152 ("clone: support remote shallow
repository", 2013-12-05), and the other one is what Geert is adding
in this thread.
We _may_ want to rename that transport.cloning field to better
reflect what it truly means (it is not "are we cloning?" but "are
there any objects in the repo to worry about?") as a preparatory
step before Geert's patch, but I do not think we should make it a
requirement to take the "let's skip collision check" patch to
improve the logic used to set that .cloning field.