Re: [PATCH 2/3] upload-pack: skip parse-object re-hashing of "want" objects
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 7, 2022, 19:26 UTC
- Message-ID
- <xmqq1qsnugsu.fsf@gitster.g>
- In-Reply-To
- <YxfSRkEiiP4TyZTM@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> The exception for both is if --verify-objects is used. In that case, > we'll skip this optimization, and the new test makes sure we do this > correctly.
I wondered if we want to test the change on the "upload-pack" side by going in to the swapped-commits repository, running upload-pack manually and seeing that it spews unusable output without failing, but it probably is not worth the effort. We have plenty of tests that exercises upload-pack in "good" cases. What might be a good test is to try fetching from swapped-commits repository and make sure that index-pack on the receiving end notices, but I suspect we already have such a "fetch/clone from a corrupt repository" test, in which case we do not have to add one.
Thanks.