On 22/05/2024 20:16, Junio C Hamano wrote:
Tom Hughes <tom@xxxxxxxxxx> writes:
If we're checking to see whether to tell the user to do a fetch
before pushing there's no need for us to actually fetch the object
from the remote if the clone is partial.
Because the promisor doesn't do negotiation actually trying to do
the fetch of the new head can be very expensive as it will try and
include history that we already have and it just results in rejecting
the push with a different message, and in behavior that is different
to a clone that is not partial.
Interesting. Is this something that is easily testable, perhaps by
preparing a partial clone and try to push from there and checking
the non-existence of the object after seeing that push failed?
Sure. I think I've managed to figure out a test and have sent
a second version of the patch with it added.
Tom
--
Tom Hughes (tom@xxxxxxxxxx)
http://compton.nu/