From: Junio C Hamano Date: Mon, 06 Aug 2018 15:16:47 GMT Subject: Re: [PATCH] add a script to diff rendered documentation Message-ID: In-Reply-To: <20180806134237.GB31282@sigill.intra.peff.net> Jeff King writes: > On Mon, Aug 06, 2018 at 09:39:55AM -0400, Jeff King wrote: > >> 3. Default to number of CPUs, which is what a lot of other threading >> in Git does. Unfortunately getting that from the shell is >> non-trivial. I'm OK with $(grep -c ^processor /proc/cpuinfo), but >> people on non-Linux platforms would have to fill in their own >> implementation. > > Is this too horrible to contemplate? Chickens, eggs and a kitchen sink. Sounds like a title of a movie. It's a bit dissapointing that we cannot express personal preference in config.mak ;-) > diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c > index 0f09bbbf65..fa8caeec0c 100644 > --- a/builtin/rev-parse.c > +++ b/builtin/rev-parse.c > @@ -635,6 +635,11 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) > continue; > } > > + if (!strcmp(arg, "--online-cpus")) { > + printf("%d", online_cpus()); > + continue; > + } > + > /* The rest of the options require a git repository. */ > if (!did_repo_setup) { > prefix = setup_git_directory(); > > -Peff