git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/4] docs/config: avoid the term "expand" for includes

From
Jeff King <peff@peff.net>
Date
May 11, 2017, 09:13 UTC
Message-ID
<20170511091304.ivauge72dncv65fs@sigill.intra.peff.net>
In-Reply-To
<20170511090905.tvkb4bk2ddjzjip4@sigill.intra.peff.net>

Using the word "expand" to refer to including the contents of another config file isn't really accurate, since it's a verbatim insertion. And it can cause confusion with the expanding of the path itself via things like "~".

Let's clarify when we are referring to the contents versus the filename, and use appropriate verbs in each case.

Signed-off-by: Jeff King <peff@peff.net>
---
I dropped the "& insert" from your suggestion, because I think it
clear in the context of the earlier "include by absolute path" (and I
think it reads better).
 Documentation/config.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 929776954..70f79ac39 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -90,8 +90,8 @@ You can include a config file from another by setting the special
 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
+The contents of the included file are inserted immediately, as if they
+had been found at the location of the include directive. If the value of the
 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.
@@ -172,8 +172,8 @@ Example
 
 	[include]
 		path = /path/to/foo.inc ; include by absolute path
-		path = foo ; expand "foo" relative to the current file
-		path = ~/foo ; expand "foo" in your `$HOME` directory
+		path = foo ; find "foo" relative to the current file
+		path = ~/foo ; find "foo" in your `$HOME` directory
 
 	; include if $GIT_DIR is /path/to/foo/.git
 	[includeIf "gitdir:/path/to/foo/.git"]
-- 
2.13.0.447.g4d26bc97c
Previous: Jeff KingNext: Jeff King
Message 17 of 22 in “Possible bug in includeIf / conditional includes”
  1. raphael.stolt@gmail.comMay 10, 2017
  2. Sebastian SchuberthMay 10, 2017
  3. Ævar Arnfjörð BjarmasonMay 10, 2017
  4. Raphael StoltMay 10, 2017
  5. Raphael StoltMay 10, 2017
  6. Jeff KingMay 11, 2017
  7. Jeff KingMay 11, 2017
  8. Ævar Arnfjörð BjarmasonMay 11, 2017
  9. Jeff KingMay 11, 2017
  10. Ævar Arnfjörð BjarmasonMay 11, 2017
  11. Jeff KingMay 11, 2017
  12. 0/4 doc improvements for config includesJeff King, May 11, 2017
  13. 1/4 docs/config: clarify include/includeIf relationshipJeff King, May 11, 2017
  14. Ramsay JonesMay 11, 2017
  15. Jeff KingMay 12, 2017
  16. 2/4 docs/config: give a relative includeIf exampleJeff King, May 11, 2017
  17. 3/4 docs/config: avoid the term "expand" for includesJeff King, May 11, 2017
  18. 4/4 docs/config: consistify include.path examplesJeff King, May 11, 2017
  19. Junio C HamanoMay 11, 2017
  20. Ævar Arnfjörð BjarmasonMay 11, 2017
  21. Junio C HamanoMay 11, 2017
  22. Jeff KingMay 11, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.