Re: [PATCH v2 2/5] preload-index: teach GIT_FORCE_PRELOAD_TEST to take a boolean
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Sep 14, 2018, 20:51 UTC
- Message-ID
- <20180914205158.GC133420@aiede.svl.corp.google.com>
- In-Reply-To
- <20180914201340.37400-3-benpeart@microsoft.com>
Ben Peart wrote:
> Subject: preload-index: teach GIT_FORCE_PRELOAD_TEST to take a boolean
Reading this subject line alone (e.g. in "git log --oneline" output), it's not obvious to me what this patch will do.
What behavior change does it make / what will it make newly possible?
Maybe something like:
preload-index: use git_env_bool() not getenv() for customization
GIT_FORCE_PRELOAD_TEST is only checked for presence by using getenv(). Use git_env_bool() instead so that GIT_FORCE_PRELOAD_TEST=false can work as expected.
Show 7 quoted lines
> Teach GIT_FORCE_PRELOAD_TEST to take a boolean to turn on or off this test > feature instead of simply testing for existance. > > Signed-off-by: Ben Peart <Ben.Peart@microsoft.com> > --- > preload-index.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)
Can you say a little about how this came up? Was it just noticed while reading the code, or did it come up in practice?
I wonder if a more useful knob would be a GIT_FORCE_PRELOAD_THREADS setting, but that's orthogonal to this change.
Thanks and hope that helps, Jonathan