Re: [PATCH 04/31] setup: don't perform lazy initialization of repository state

2017-06-05 Thread Brandon Williams
On 06/05, Jeff King wrote: > On Mon, Jun 05, 2017 at 10:43:52AM -0700, Brandon Williams wrote: > > > > In the case of setup_git_env(), I think it was less about doing work and > > > more that we didn't want to have to do explicit setup in each program. > > > But over the years we've moved away fro

Re: [PATCH 04/31] setup: don't perform lazy initialization of repository state

2017-06-05 Thread Jeff King
On Mon, Jun 05, 2017 at 10:43:52AM -0700, Brandon Williams wrote: > > In the case of setup_git_env(), I think it was less about doing work and > > more that we didn't want to have to do explicit setup in each program. > > But over the years we've moved away from that, and in fact if you hit > > th

Re: [PATCH 04/31] setup: don't perform lazy initialization of repository state

2017-06-05 Thread Brandon Williams
On 06/02, Jeff King wrote: > On Thu, Jun 01, 2017 at 12:23:25PM -0700, Stefan Beller wrote: > > > On Wed, May 31, 2017 at 2:43 PM, Brandon Williams wrote: > > > Under some circumstances (bogus GIT_DIR value or the discovered gitdir > > > is '.git') 'setup_git_directory()' won't initialize key rep

Re: [PATCH 04/31] setup: don't perform lazy initialization of repository state

2017-06-02 Thread Jeff King
On Thu, Jun 01, 2017 at 12:23:25PM -0700, Stefan Beller wrote: > On Wed, May 31, 2017 at 2:43 PM, Brandon Williams wrote: > > Under some circumstances (bogus GIT_DIR value or the discovered gitdir > > is '.git') 'setup_git_directory()' won't initialize key repository > > state. This leads to inc

Re: [PATCH 04/31] setup: don't perform lazy initialization of repository state

2017-06-01 Thread Stefan Beller
On Wed, May 31, 2017 at 2:43 PM, Brandon Williams wrote: > Under some circumstances (bogus GIT_DIR value or the discovered gitdir > is '.git') 'setup_git_directory()' won't initialize key repository > state. This leads to inconsistent state after running the setup code. > To account for this inco

[PATCH 04/31] setup: don't perform lazy initialization of repository state

2017-05-31 Thread Brandon Williams
Under some circumstances (bogus GIT_DIR value or the discovered gitdir is '.git') 'setup_git_directory()' won't initialize key repository state. This leads to inconsistent state after running the setup code. To account for this inconsistent state, lazy initialization is done once a caller asks for