Re: [PATCH v7 3/3] config: add conditional include

2017-03-03 Thread Jeff King
On Fri, Mar 03, 2017 at 11:05:20AM -0800, Junio C Hamano wrote: > I am not sure about "obviousness", but I agree that we do not know > that "conditional include" would be the only thing we want for the > second level for "include.path" directive. "include-if..path" > is better for that reason. >

Re: [PATCH v7 3/3] config: add conditional include

2017-03-03 Thread Junio C Hamano
Jeff King writes: > That was how I had originally envisioned the namespace working when I > introduced include.path long ago. And I think Duy's v1 used that, but > the feedback was that it was not sufficiently obvious that the > subsection was a conditional. I am not sure about "obviousness", bu

Re: [PATCH v7 3/3] config: add conditional include

2017-03-02 Thread Jeff King
On Wed, Mar 01, 2017 at 09:47:40AM -0800, Junio C Hamano wrote: > > @@ -185,6 +271,12 @@ int git_config_include(const char *var, const char > > *value, void *data) > > > > if (!strcmp(var, "include.path")) > > ret = handle_path_include(value, inc); > > + > > + if (!parse_confi

Re: [PATCH v7 3/3] config: add conditional include

2017-03-01 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > int git_config_include(const char *var, const char *value, void *data) > { > struct config_include_data *inc = data; > + const char *cond, *key; > + int cond_len; > int ret; > > /* > @@ -185,6 +271,12 @@ int git_config_include(const ch

Re: [PATCH v7 3/3] config: add conditional include

2017-03-01 Thread Ramsay Jones
On 01/03/17 11:26, Nguyễn Thái Ngọc Duy wrote: > Sometimes a set of repositories want to share configuration settings > among themselves that are distinct from other such sets of repositories. > A user may work on two projects, each of which have multiple > repositories, and use one user.email fo

[PATCH v7 3/3] config: add conditional include

2017-03-01 Thread Nguyễn Thái Ngọc Duy
Sometimes a set of repositories want to share configuration settings among themselves that are distinct from other such sets of repositories. A user may work on two projects, each of which have multiple repositories, and use one user.email for one project while using another for the other. Setting