Re: [PATCH v4] config: add conditional include

2016-08-24 Thread Jeff King
On Wed, Aug 24, 2016 at 02:44:29PM +0200, Jakub Narębski wrote: > W dniu 24.08.2016 o 11:37, Duy Nguyen pisze: > > > It works for me either way. So I'm going to assume we want > > "[include-if "gitdir-is:..."]", unless people think it needs more > > discussion (then just write something,

Re: [PATCH v4] config: add conditional include

2016-08-24 Thread Jakub Narębski
W dniu 24.08.2016 o 11:37, Duy Nguyen pisze: > It works for me either way. So I'm going to assume we want > "[include-if "gitdir-is:..."]", unless people think it needs more > discussion (then just write something, anything, so I can put it back > in my backlog) A final note: [include

Re: [PATCH v4] config: add conditional include

2016-08-24 Thread Duy Nguyen
On Tue, Aug 23, 2016 at 8:42 PM, Johannes Schindelin wrote: > Hi Duy, > > On Mon, 22 Aug 2016, Duy Nguyen wrote: > >> On Mon, Aug 22, 2016 at 8:22 PM, Matthieu Moy >> wrote: >> >>> I think the syntax should be design to allow arbitrary

Re: [PATCH v4] config: add conditional include

2016-08-23 Thread Johannes Schindelin
Hi Duy, On Mon, 22 Aug 2016, Duy Nguyen wrote: > On Mon, Aug 22, 2016 at 8:22 PM, Matthieu Moy > wrote: > >>> I think the syntax should be design to allow arbitrary boolean > >>> expression later if needed. > >> > >> I would be against that. We may extend it more

Re: [PATCH v4] config: add conditional include

2016-08-22 Thread Duy Nguyen
On Mon, Aug 22, 2016 at 8:22 PM, Matthieu Moy wrote: >>> I think the syntax should be design to allow arbitrary boolean >>> expression later if needed. >> >> I would be against that. We may extend it more in future, but it >> should be under control, not full boolean

Re: [PATCH v4] config: add conditional include

2016-08-22 Thread Matthieu Moy
Duy Nguyen writes: > On Mon, Aug 22, 2016 at 7:59 PM, Matthieu Moy > wrote: >> Duy Nguyen writes: >> >>> On Sun, Aug 21, 2016 at 4:08 AM, Jakub Narębski wrote: W dniu 19.08.2016 o 15:54, Jeff King

Re: [PATCH v4] config: add conditional include

2016-08-22 Thread Duy Nguyen
On Mon, Aug 22, 2016 at 7:59 PM, Matthieu Moy wrote: > Duy Nguyen writes: > >> On Sun, Aug 21, 2016 at 4:08 AM, Jakub Narębski wrote: >>> W dniu 19.08.2016 o 15:54, Jeff King pisze: On Sat, Aug 13, 2016 at 03:40:59PM +0700,

Re: [PATCH v4] config: add conditional include

2016-08-22 Thread Matthieu Moy
Duy Nguyen writes: > On Sun, Aug 21, 2016 at 4:08 AM, Jakub Narębski wrote: >> W dniu 19.08.2016 o 15:54, Jeff King pisze: >>> On Sat, Aug 13, 2016 at 03:40:59PM +0700, Duy Nguyen wrote: >>> Ping.. >>> >>> There was some discussion after v4. I think the

Re: [PATCH v4] config: add conditional include

2016-08-22 Thread Duy Nguyen
On Sun, Aug 21, 2016 at 4:08 AM, Jakub Narębski wrote: > W dniu 19.08.2016 o 15:54, Jeff King pisze: >> On Sat, Aug 13, 2016 at 03:40:59PM +0700, Duy Nguyen wrote: >> >>> Ping.. >> >> There was some discussion after v4. I think the open issues are: >> >> - the commit message

Re: [PATCH v4] config: add conditional include

2016-08-20 Thread Jakub Narębski
W dniu 19.08.2016 o 15:54, Jeff King pisze: > On Sat, Aug 13, 2016 at 03:40:59PM +0700, Duy Nguyen wrote: > >> Ping.. > > There was some discussion after v4. I think the open issues are: > > - the commit message is rather terse (it should describe motivation, > and can refer to the docs

Re: [PATCH v4] config: add conditional include

2016-08-19 Thread Jeff King
On Sat, Aug 13, 2016 at 03:40:59PM +0700, Duy Nguyen wrote: > Ping.. There was some discussion after v4. I think the open issues are: - the commit message is rather terse (it should describe motivation, and can refer to the docs for the "how") - the syntax might be more clear as:

Re: [PATCH v4] config: add conditional include

2016-08-13 Thread Duy Nguyen
Ping.. On Thu, Jul 14, 2016 at 10:33 PM, Nguyễn Thái Ngọc Duy wrote: > Helped-by: Jeff King > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > The diff from v3 is mostly clarification in code and document. > > diff --git

Re: [PATCH v4] config: add conditional include

2016-07-20 Thread Junio C Hamano
Jeff King writes: > On Sun, Jul 17, 2016 at 10:15:55AM +0200, Johannes Schindelin wrote: > >> FWIW I am slightly less worried about the conditional includes (it is >> already a horrible mess to figure out too-long include chains now, before >> having conditional includes, for

Re: [PATCH v4] config: add conditional include

2016-07-20 Thread Jakub Narębski
W dniu 2016-07-16 o 18:47, Jeff King pisze: > Heh. Don't get me wrong, I do think there's room for digging ourselves a > deep hole with conditional includes, because anything dynamic opens up a > question of _when_ it is evaluated, and in what context. So any > condition should be something that

Re: [PATCH v4] config: add conditional include

2016-07-20 Thread Jeff King
On Sun, Jul 17, 2016 at 10:15:55AM +0200, Johannes Schindelin wrote: > FWIW I am slightly less worried about the conditional includes (it is > already a horrible mess to figure out too-long include chains now, before > having conditional includes, for example). I am slightly more worried > about

Re: [PATCH v4] config: add conditional include

2016-07-17 Thread Johannes Schindelin
Hi Peff, On Sat, 16 Jul 2016, Jeff King wrote: > On Sat, Jul 16, 2016 at 06:36:03PM +0200, Johannes Schindelin wrote: > > > > On Sat, Jul 16, 2016 at 03:30:45PM +0200, Johannes Schindelin wrote: > > > > > > > As an alternative solution to your problem, you could of course avoid > > > > all >

Re: [PATCH v4] config: add conditional include

2016-07-16 Thread Jeff King
On Sat, Jul 16, 2016 at 06:36:03PM +0200, Johannes Schindelin wrote: > > On Sat, Jul 16, 2016 at 03:30:45PM +0200, Johannes Schindelin wrote: > > > > > As an alternative solution to your problem, you could of course avoid all > > > conditional includes. Simply by adding the include.path settings

Re: [PATCH v4] config: add conditional include

2016-07-16 Thread Johannes Schindelin
Hi Peff, On Sat, 16 Jul 2016, Jeff King wrote: > On Sat, Jul 16, 2016 at 03:30:45PM +0200, Johannes Schindelin wrote: > > > As an alternative solution to your problem, you could of course avoid all > > conditional includes. Simply by adding the include.path settings > > explicitly to the

Re: [PATCH v4] config: add conditional include

2016-07-16 Thread Jeff King
On Sat, Jul 16, 2016 at 03:30:45PM +0200, Johannes Schindelin wrote: > > >> + ; include if $GIT_DIR is /path/to/foo/.git > > >> + [include "gitdir:/path/to/foo/.git"] > > >> + path = /path/to/foo.inc > > > > > > I find this way to specify a conditional unintuitive. Reading > >

Re: [PATCH v4] config: add conditional include

2016-07-16 Thread Duy Nguyen
On Sat, Jul 16, 2016 at 3:30 PM, Johannes Schindelin wrote: > As an alternative solution to your problem, you could of course avoid all > conditional includes. Simply by adding the include.path settings > explicitly to the configs that require them. Now, that would

Re: [PATCH v4] config: add conditional include

2016-07-16 Thread Johannes Schindelin
Hi Duy, On Thu, 14 Jul 2016, Duy Nguyen wrote: > On Thu, Jul 14, 2016 at 5:53 PM, Johannes Schindelin > wrote: > > Hi Duy, > > > > On Thu, 14 Jul 2016, Nguyễn Thái Ngọc Duy wrote: > > > >> Helped-by: Jeff King > >> Signed-off-by: Nguyễn Thái Ngọc Duy

Re: [PATCH v4] config: add conditional include

2016-07-14 Thread Duy Nguyen
On Thu, Jul 14, 2016 at 5:53 PM, Johannes Schindelin wrote: > Hi Duy, > > On Thu, 14 Jul 2016, Nguyễn Thái Ngọc Duy wrote: > >> Helped-by: Jeff King >> Signed-off-by: Nguyễn Thái Ngọc Duy > > This commit message is quite a bit short

Re: [PATCH v4] config: add conditional include

2016-07-14 Thread Johannes Schindelin
Hi Duy, On Thu, 14 Jul 2016, Nguyễn Thái Ngọc Duy wrote: > Helped-by: Jeff King > Signed-off-by: Nguyễn Thái Ngọc Duy This commit message is quite a bit short on details. I still fail to see what use case this would benefit, and I already start to suspect

[PATCH v4] config: add conditional include

2016-07-14 Thread Nguyễn Thái Ngọc Duy
Helped-by: Jeff King Signed-off-by: Nguyễn Thái Ngọc Duy --- The diff from v3 is mostly clarification in code and document. diff --git a/Documentation/config.txt b/Documentation/config.txt index 18623ee..d971334 100644 ---