docs/config: give a relative includeIf example
authorJeff King <peff@peff.net>
Thu, 11 May 2017 09:11:06 +0000 (05:11 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 May 2017 01:06:58 +0000 (10:06 +0900)
The changes in the previous commit hopefully clarify that
the evaluation of an include "path" variable is the same no
matter if it's in a conditional section or not. But since
this question came up on the list, let's add an example that
makes it obvious.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt

index 7e7a358..cc6d79e 100644 (file)
@@ -187,6 +187,12 @@ Example
        [includeIf "gitdir:~/to/group/"]
                path = /path/to/foo.inc
 
+       ; relative paths are always relative to the including
+       ; file (if the condition is true); their location is not
+       ; affected by the condition
+       [includeIf "gitdir:/path/to/group/"]
+               path = foo.inc
+
 Values
 ~~~~~~