[PATCH 2/2] fsck: lazily load types under --connectivity-only

2017-01-25 Thread Jeff King
The recent fixes to "fsck --connectivity-only" load all of the objects with their correct types. This keeps the connectivity-only code path close to the regular one, but it also introduces some unnecessary inefficiency. While getting the type of an object is cheap compared to actually opening and p

Re: [PATCH 2/2] fsck: lazily load types under --connectivity-only

2017-01-26 Thread Johannes Schindelin
Hi Peff, On Wed, 25 Jan 2017, Jeff King wrote: > builtin/fsck.c | 58 > +++--- > fsck.c | 4 > 2 files changed, 11 insertions(+), 51 deletions(-) Patch looks good to my eyes. Ciao, Johannes

Re: [PATCH 2/2] fsck: lazily load types under --connectivity-only

2017-01-26 Thread Junio C Hamano
Jeff King writes: > The recent fixes to "fsck --connectivity-only" load all of > the objects with their correct types. This keeps the > connectivity-only code path close to the regular one, but it > also introduces some unnecessary inefficiency. While getting > the type of an object is cheap comp

Re: [PATCH 2/2] fsck: lazily load types under --connectivity-only

2017-01-26 Thread Jeff King
On Thu, Jan 26, 2017 at 10:51:00AM -0800, Junio C Hamano wrote: > > 2. It serves as a cross-check that the coercion in (1a) is > > correct (i.e., we'll complain about a parent link that > > points to a blob). But we get most of this for free > > already, because right after coerci