From: Jeff King Date: Fri, 03 Mar 2017 04:51:48 GMT Subject: Re: [PATCH v2 7/9] read_early_config(): avoid .git/config hack when unneeded Message-ID: <20170303045148.uzltelasbodvgys4@sigill.intra.peff.net> In-Reply-To: On Fri, Mar 03, 2017 at 03:04:28AM +0100, Johannes Schindelin wrote: > So far, we only look whether the startup_info claims to have seen a > git_dir. > > However, do_git_config_sequence() (and consequently the > git_config_with_options() call used by read_early_config() asks the > have_git_dir() function whether we have a .git/ directory, which in turn > also looks at git_dir and at the environment variable GIT_DIR. And when > this is the case, the repository config is handled already, so we do not > have to do that again explicitly. > > Let's just use the same function, have_git_dir(), to determine whether we > have to handle .git/config explicitly. Good, this makes sense. -Peff