From: Duy Nguyen Date: Mon, 17 Apr 2017 01:42:55 GMT Subject: Re: [PATCH 1/2] config: prepare to pass more info in git_config_with_options() Message-ID: <20170417014255.GA8987@duynguyen.vn.dektech.internal> In-Reply-To: <20170416153127.f227kdbfctgrumh4@sigill.intra.peff.net> On Sun, Apr 16, 2017 at 11:31:28AM -0400, Jeff King wrote: > On Sun, Apr 16, 2017 at 05:41:24PM +0700, Nguyễn Thái Ngọc Duy wrote: > > > So far we can only pass one flag, respect_includes, to thie function. We > > need to pass some more (non-flag even), so let's make it accept a struct > > instead of an integer. > > Yeah, this makes sense. But... > > > diff --git a/builtin/config.c b/builtin/config.c > > index 4f49a0edb9..5de4a36146 100644 > > --- a/builtin/config.c > > +++ b/builtin/config.c > > @@ -26,7 +26,8 @@ static int use_global_config, use_system_config, use_local_config; > > static struct git_config_source given_config_source; > > static int actions, types; > > static int end_null; > > -static int respect_includes = -1; > > +static int respect_includes_opt; > > +static struct config_options config_options; > > It fails all the git-config "include" tests because respect_includes_opt > is missing the initialization to "-1". Serves me right for doing last-minute "harmless" refactoring without rerunning the test suite :( > > -Peff