From: Jeff Hostetler Date: Thu, 16 Nov 2017 17:43:44 GMT Subject: Re: [PATCH 02/14] clone, fetch-pack, index-pack, transport: partial clone Message-ID: <18ed2934-bf90-dc40-5d94-9de058d8f7f1@jeffhostetler.com> In-Reply-To: <20171108180127.GG20681@dinwoodie.org> On 11/8/2017 1:01 PM, Adam Dinwoodie wrote: > On Friday 03 November 2017 at 01:32 pm -0700, Jonathan Tan wrote: >> On Thu, 2 Nov 2017 20:31:17 +0000 >> Jeff Hostetler wrote: >>> diff --git a/builtin/index-pack.c b/builtin/index-pack.c >>> index a0a35e6..31cd5ba 100644 >>> --- a/builtin/index-pack.c >>> +++ b/builtin/index-pack.c >>> @@ -222,6 +222,16 @@ static unsigned check_object(struct object *obj) >>> if (!(obj->flags & FLAG_CHECKED)) { >>> unsigned long size; >>> int type = sha1_object_info(obj->oid.hash, &size); >>> + >>> + if (type <= 0) { >>> + /* >>> + * TODO Use the promisor code to conditionally >>> + * try to fetch this object -or- assume it is ok. >>> + */ >>> + obj->flags |= FLAG_CHECKED; >>> + return 0; >>> + } >>> + >>> if (type <= 0) >>> die(_("did not receive expected object %s"), >>> oid_to_hex(&obj->oid)); >> >> This causes some repo corruption tests to fail. > > Confirmed: I see this patch, or at least f7e0dbc38 ("clone, fetch-pack, > index-pack, transport: partial clone", 2017-11-02), causing t5300.26 to > fail on 64-bit Cygwin. > > For the sake of anyone trying to reproduce this, I needed to cherry pick > 66d4c7a58 ("fixup! upload-pack: add object filtering for partial clone", > 2017-11-08) onto that commit before I was able to get it to compile. > > Adam > Thanks. I've removed this from my next version. I think it was left over from a pre-promisor version. Jeff