Skip to content

Commit 994cd6c

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Reviewed-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9d71d94 commit 994cd6c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/config.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ Example
187187
[includeIf "gitdir:~/to/group/"]
188188
path = /path/to/foo.inc
189189

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+
190196
Values
191197
~~~~~~
192198

0 commit comments

Comments
 (0)