Re: [PATCH v2] commit: skip discarding the index if there is no pre-commit hook

2017-08-15 Thread Junio C Hamano
Jeff King writes: > On Tue, Aug 15, 2017 at 04:23:50AM +, Kevin Willford wrote: > >> > This read_cache_from() should be a noop, right, because it immediately >> > sees istate->initialized is set? So it shouldn't matter that it is not >> > in the conditional with discard_cache(). Though if its

Re: [PATCH v2] commit: skip discarding the index if there is no pre-commit hook

2017-08-14 Thread Jeff King
On Tue, Aug 15, 2017 at 04:23:50AM +, Kevin Willford wrote: > > This read_cache_from() should be a noop, right, because it immediately > > sees istate->initialized is set? So it shouldn't matter that it is not > > in the conditional with discard_cache(). Though if its only purpose is > > to re

RE: [PATCH v2] commit: skip discarding the index if there is no pre-commit hook

2017-08-14 Thread Kevin Willford
> On Mon, Aug 14, 2017 at 03:54:25PM -0600, Kevin Willford wrote: > > > If there is not a pre-commit hook, there is no reason to discard > > the index and reread it. > > > > This change checks to presence of a pre-commit hook and then only > > discards the index if there was one. > > > > Signed-of

Re: [PATCH v2] commit: skip discarding the index if there is no pre-commit hook

2017-08-14 Thread Jeff King
On Mon, Aug 14, 2017 at 03:54:25PM -0600, Kevin Willford wrote: > If there is not a pre-commit hook, there is no reason to discard > the index and reread it. > > This change checks to presence of a pre-commit hook and then only > discards the index if there was one. > > Signed-off-by: Kevin Will