docs/config: give a relative includeIf example
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>
Jeff King committed
May 11, 2017 at 05:11 UTC
994cd6c7ca2da9bf09582ba08cbad583cba76968
1 file changed
+6
Documentation/config.txt
+6
@@ -187,6 +187,12 @@ Example
187
[includeIf "gitdir:~/to/group/"]
188
path = /path/to/foo.inc
189
190
+ ; relative paths are always relative to the including
191
+ ; file (if the condition is true); their location is not
192
+ ; affected by the condition
193
+ [includeIf "gitdir:/path/to/group/"]
194
+ path = foo.inc
195
+
196
Values
197
~~~~~~
198