Re: Possible bug in includeIf / conditional includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 found it wasn't really any
> better, but just wanted to send an explanation for why I didn't find
> it while I remembered, as a sort of case study.
> [...]
> > I suspect that whole paragraph under Includes could be reworded to make
> > it clear that anything it is saying applies equally to include.$key and
> > includeIf.*.$key, and then that would future-proof us for other
> > modifications.

What about this:

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 475e874d5..e44ad21eb 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -80,13 +80,13 @@ Includes
 ~~~~~~~~
 
 You can include a config file from another by setting the special
-`include.path` variable to the name of the file to be included. The
-variable takes a pathname as its value, and is subject to tilde
-expansion. `include.path` can be given multiple times.
+`include.path` and `includeIf.*.path` variables to the name of the file
+to be included. The variable takes a pathname as its value, and is
+subject to tilde expansion. These variables can be given multiple times.
 
 The included file is expanded immediately, as if its contents had been
 found at the location of the include directive. If the value of the
-`include.path` variable is a relative path, the path is considered to
+variable is a relative path, the path is considered to
 be relative to the configuration file in which the include directive
 was found.  See below for examples.
 
@@ -95,8 +95,7 @@ Conditional includes
 
 You can include a config file from another conditionally by setting a
 `includeIf.<condition>.path` variable to the name of the file to be
-included. The variable's value is treated the same way as
-`include.path`. `includeIf.<condition>.path` can be given multiple times.
+included (see the "Includes" section above for more details).
 
 The condition starts with a keyword followed by a colon and some data
 whose format and meaning depends on the keyword. Supported keywords



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]