From: Duy Nguyen Date: Mon, 29 Oct 2018 17:21:30 GMT Subject: Re: [PATCH 09/10] read-cache.c: remove #ifdef NO_PTHREADS Message-ID: In-Reply-To: <9e489011-36b9-a8b3-838d-de1a097f4854@gmail.com> On Mon, Oct 29, 2018 at 6:05 PM Ben Peart wrote: > > @@ -2756,8 +2745,11 @@ static int do_write_index(struct index_state *istate, struct tempfile *tempfile, > > if (ce_write(&c, newfd, &hdr, sizeof(hdr)) < 0) > > return -1; > > > > -#ifndef NO_PTHREADS > > - nr_threads = git_config_get_index_threads(); > > + if (HAVE_THREADS) > > This shouldn't be needed either. My assumption was that if someone > explicitly asked for multiple threads we're better off failing than > silently ignoring their request. The default/automatic setting will > detect the number of cpus and behave correctly. No. I can have ~/.gitconfig shared between different machines. One with multithread support and one without. I should not have to fall back to conditional includes in order to use the same config file on the machine without multithread. -- Duy