Re: [PATCH 2/2] index-pack: detect local corruption in collision check

2017-04-01 Thread Junio C Hamano
Jeff King writes: > is not a collision but rather local corruption. We should > reoprt that instead (just like we do if reading the rest of > the object content fails a few lines later). s/reoprt/report/ (locally amended while queuing). > We may want to tighten that up. In the long run, I'd lov

[PATCH 2/2] index-pack: detect local corruption in collision check

2017-04-01 Thread Jeff King
When we notice that we have a local copy of an incoming object, we compare the two objects to make sure we haven't found a collision. Before we get to the actual object bytes, though, we compare the type and size from sha1_object_info(). If our local object is corrupted, then the type will be OBJ_