Re: Possible bug in includeIf / conditional includes on non git initialised directories

2017-05-12 Thread Ævar Arnfjörð Bjarmason
On Thu, May 11, 2017 at 8:53 PM, Raphael Stolt wrote: > Hi there, > > I might have stumbled this time over a real bug in includeIf / conditional > includes or maybe it's just as intended. > 1) Given I have a correct configured includeIf and I’m issuing `git config > --show-origin --get user.emai

Re: Possible bug in includeIf / conditional includes on non git initialised directories

2017-05-11 Thread Jeff King
On Thu, May 11, 2017 at 10:31:14PM +0200, Sebastian Schuberth wrote: > On 2017-05-11 20:53, Raphael Stolt wrote: > > > I might have stumbled this time over a real bug in includeIf / conditional > > includes or maybe it's just as intended. > > 1) Given I have a correct configured includeIf and I’

Re: Possible bug in includeIf / conditional includes on non git initialised directories

2017-05-11 Thread Sebastian Schuberth
On 2017-05-11 20:53, Raphael Stolt wrote: > I might have stumbled this time over a real bug in includeIf / conditional > includes or maybe it's just as intended. > 1) Given I have a correct configured includeIf and I’m issuing `git config > --show-origin --get user.email` against an directory wh

Possible bug in includeIf / conditional includes on non git initialised directories

2017-05-11 Thread Raphael Stolt
Hi there, I might have stumbled this time over a real bug in includeIf / conditional includes or maybe it's just as intended. 1) Given I have a correct configured includeIf and I’m issuing `git config --show-origin --get user.email` against an directory which hasn’t been `git init`ed I get the

Re: Possible bug in includeIf / conditional includes

2017-05-11 Thread Jeff King
On Thu, May 11, 2017 at 12:54:19AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Thu, May 11, 2017 at 09:19:50AM +0200, Ævar Arnfjörð Bjarmason wrote: > > > >> 1. It says "The included file is expanded immediately, as if its > >> contents had been found at the location of the include

Re: Possible bug in includeIf / conditional includes

2017-05-11 Thread Junio C Hamano
Jeff King writes: > On Thu, May 11, 2017 at 09:19:50AM +0200, Ævar Arnfjörð Bjarmason wrote: > >> 1. It says "The included file is expanded immediately, as if its >> contents had been found at the location of the include directive.". At >> first I thought this referred to glob expansion, not >> s

Re: Possible bug in includeIf / conditional includes

2017-05-11 Thread Jeff King
On Thu, May 11, 2017 at 09:49:09AM +0200, Ævar Arnfjörð Bjarmason wrote: > > I don't like this because it copies the rules for _one_ property to the > > conditional section. What happens when you're looking for some other > > property of include.path? > > Yeah, as I said once I wrote it up I foun

Re: Possible bug in includeIf / conditional includes

2017-05-11 Thread Ævar Arnfjörð Bjarmason
On Thu, May 11, 2017 at 9:42 AM, Jeff King wrote: > On Thu, May 11, 2017 at 09:19:50AM +0200, Ævar Arnfjörð Bjarmason wrote: > >> 1. It says "The included file is expanded immediately, as if its >> contents had been found at the location of the include directive.". At >> first I thought this refer

Re: Possible bug in includeIf / conditional includes

2017-05-11 Thread Jeff King
On Thu, May 11, 2017 at 09:19:50AM +0200, Ævar Arnfjörð Bjarmason wrote: > 1. It says "The included file is expanded immediately, as if its > contents had been found at the location of the include directive.". At > first I thought this referred to glob expansion, not > s/expanded/interpolated/, th

Re: Possible bug in includeIf / conditional includes

2017-05-11 Thread Ævar Arnfjörð Bjarmason
On Thu, May 11, 2017 at 8:29 AM, Jeff King wrote: > On Thu, May 11, 2017 at 02:26:16AM -0400, Jeff King wrote: > >> > So whether this is a bug in the code or not it seems to definitely be >> > a doc bug, whatever it does with relative files should be in the docs. >> >> The includeIf variables shou

Re: Possible bug in includeIf / conditional includes

2017-05-10 Thread Jeff King
On Thu, May 11, 2017 at 02:26:16AM -0400, Jeff King wrote: > > So whether this is a bug in the code or not it seems to definitely be > > a doc bug, whatever it does with relative files should be in the docs. > > The includeIf variables should behave exactly as the documentation you > quoted above

Re: Possible bug in includeIf / conditional includes

2017-05-10 Thread Jeff King
On Wed, May 10, 2017 at 09:48:05PM +0200, Ævar Arnfjörð Bjarmason wrote: > In both cases the conditional is the same, but the path is relative > v.s. absolute. > > Raphael: Does the config get included if you cd to > ~/Work/git-repos/oss/? From git-config(1): That shouldn't matter for relative p

Re: Possible bug in includeIf / conditional includes

2017-05-10 Thread Raphael Stolt
> Am 10.05.2017 um 23:21 schrieb Raphael Stolt : > >> >> Am 10.05.2017 um 21:48 schrieb Ævar Arnfjörð Bjarmason : >> >> On Wed, May 10, 2017 at 8:58 PM, Sebastian Schuberth >> wrote: >>> On 2017-05-10 19:00, raphael.st...@gmail.com wrote: >>> Current configuration which finds the conditi

Re: Possible bug in includeIf / conditional includes

2017-05-10 Thread Raphael Stolt
> > Am 10.05.2017 um 21:48 schrieb Ævar Arnfjörð Bjarmason : > > On Wed, May 10, 2017 at 8:58 PM, Sebastian Schuberth > wrote: >> On 2017-05-10 19:00, raphael.st...@gmail.com wrote: >> >>> Current configuration which finds the conditional configuration. >>> a) >>> ~/.gitconfig >>> [includeIf

Re: Possible bug in includeIf / conditional includes

2017-05-10 Thread Ævar Arnfjörð Bjarmason
On Wed, May 10, 2017 at 8:58 PM, Sebastian Schuberth wrote: > On 2017-05-10 19:00, raphael.st...@gmail.com wrote: > >> Current configuration which finds the conditional configuration. >> >> ~/.gitconfig >> [includeIf "gitdir:~/Work/git-repos/oss/"] >>path = ~/Work/git-repos/oss/.oss-gitconfig

Re: Possible bug in includeIf / conditional includes

2017-05-10 Thread Sebastian Schuberth
On 2017-05-10 19:00, raphael.st...@gmail.com wrote: Current configuration which finds the conditional configuration. ~/.gitconfig [includeIf "gitdir:~/Work/git-repos/oss/"] path = ~/Work/git-repos/oss/.oss-gitconfig Expected configuration which doesn't find the conditional configuration: ~

Possible bug in includeIf / conditional includes

2017-05-10 Thread raphael . stolt
Hi there, I might have stumbled over a bug in includeIf / conditional includes or maybe it's just as intended. Current configuration which finds the conditional configuration. ~/.gitconfig [includeIf "gitdir:~/Work/git-repos/oss/"] path = ~/Work/git-repos/oss/.oss-gitconfig Expected configur