Re: [PATCH v6 1/1] config: add conditional include

2017-02-26 Thread Philip Oakley
From: "Duy Nguyen" On Sat, Feb 25, 2017 at 5:08 AM, Philip Oakley wrote: +Conditional includes + + +You can include one config file from another conditionally by setting On first reading I thought this implied you can only have

Re: [PATCH v6 1/1] config: add conditional include

2017-02-25 Thread Jeff King
On Fri, Feb 24, 2017 at 08:14:25PM +0700, Nguyễn Thái Ngọc Duy wrote: > +static int include_condition_is_true(const char *cond, size_t cond_len) > +{ > + /* no condition (i.e., "include.path") is always true */ > + if (!cond) > + return 1; > + > + if (skip_prefix_mem(cond,

Re: [PATCH v6 1/1] config: add conditional include

2017-02-25 Thread Duy Nguyen
On Sat, Feb 25, 2017 at 5:08 AM, Philip Oakley wrote: >> +Conditional includes >> + >> + >> +You can include one config file from another conditionally by setting > > > On first reading I thought this implied you can only have one `includeIf` > within the

Re: [PATCH v6 1/1] config: add conditional include

2017-02-24 Thread Philip Oakley
From: "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

Re: [PATCH v6 1/1] config: add conditional include

2017-02-24 Thread Ramsay Jones
On 24/02/17 13:14, Nguyễn Thái Ngọc Duy wrote: [snip] > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > Documentation/config.txt | 61 + > config.c | 97 > +++ > t/t1305-config-include.sh

Re: [PATCH v6 1/1] config: add conditional include

2017-02-24 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +Conditional includes > + > + > +You can include one config file from another conditionally by setting > +a `includeIf..path` variable to the name of the file to be > +included. The variable's value is treated the same way as

[PATCH v6 1/1] config: add conditional include

2017-02-24 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.

[PATCH v6 1/1] config: add conditional include

2017-02-24 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.