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

[PATCH v3 4/4] git-var doc: fix usage of $ENV_VAR vs ENV_VAR

From
Jean-Noël Avila <jn.avila@free.fr>
Date
May 10, 2025, 12:33 UTC
Message-ID
<20250510123346.20927-5-jn.avila@free.fr>
In-Reply-To
<20250510123346.20927-1-jn.avila@free.fr>

When refering to environment variables in the documentation, use the ENV_VARIABLE format instead of $ENV_VARIABLE. The latter is used in the documentation to refer to the actual value of the variable, not the name of the variable.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
 Documentation/git-var.adoc | 40 ++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a/Documentation/git-var.adoc b/Documentation/git-var.adoc
index 909963b1c2..b606c2d649 100644
--- a/Documentation/git-var.adoc
+++ b/Documentation/git-var.adoc
@@ -32,58 +32,56 @@ EXAMPLES
 
 VARIABLES
 ---------
-GIT_AUTHOR_IDENT::
+`GIT_AUTHOR_IDENT`::
     The author of a piece of code.
 
-GIT_COMMITTER_IDENT::
+`GIT_COMMITTER_IDENT`::
     The person who put a piece of code into Git.
 
-GIT_EDITOR::
+`GIT_EDITOR`::
     Text editor for use by Git commands.  The value is meant to be
     interpreted by the shell when it is used.  Examples: `~/bin/vi`,
     `$SOME_ENVIRONMENT_VARIABLE`, `"C:\Program Files\Vim\gvim.exe"
-    --nofork`.  The order of preference is the `$GIT_EDITOR`
-    environment variable, then `core.editor` configuration, then
-    `$VISUAL`, then `$EDITOR`, and then the default chosen at compile
+    --nofork`.  The order of preference is `$GIT_EDITOR`, then
+    `core.editor` configuration value, then `$VISUAL`, then
+    `$EDITOR`, and then the default chosen at compile
     time, which is usually 'vi'.
 ifdef::git-default-editor[]
     The build you are using chose '{git-default-editor}' as the default.
 endif::git-default-editor[]
 
-GIT_SEQUENCE_EDITOR::
+`GIT_SEQUENCE_EDITOR`::
     Text editor used to edit the 'todo' file while running `git rebase
     -i`. Like `GIT_EDITOR`, the value is meant to be interpreted by
-    the shell when it is used. The order of preference is the
-    `$GIT_SEQUENCE_EDITOR` environment variable, then
-    `sequence.editor` configuration, and then the value of `git var
-    GIT_EDITOR`.
+    the shell when it is used. The order of preference is
+    `$GIT_SEQUENCE_EDITOR`, then `sequence.editor` configuration value,
+    and then the value of `git var GIT_EDITOR`.
 
-GIT_PAGER::
+`GIT_PAGER`::
     Text viewer for use by Git commands (e.g., 'less').  The value
     is meant to be interpreted by the shell.  The order of preference
-    is the `$GIT_PAGER` environment variable, then `core.pager`
-    configuration, then `$PAGER`, and then the default chosen at
-    compile time (usually 'less').
+    is `$GIT_PAGER`, then the value of `core.pager` configuration, then
+    `$PAGER`, and then the default chosen at compile time (usually `less`).
 ifdef::git-default-pager[]
     The build you are using chose '{git-default-pager}' as the default.
 endif::git-default-pager[]
 
-GIT_DEFAULT_BRANCH::
+`GIT_DEFAULT_BRANCH`::
     The name of the first branch created in newly initialized repositories.
 
-GIT_SHELL_PATH::
+`GIT_SHELL_PATH`::
     The path of the binary providing the POSIX shell for commands which use the shell.
 
-GIT_ATTR_SYSTEM::
+`GIT_ATTR_SYSTEM`::
     The path to the system linkgit:gitattributes[5] file, if one is enabled.
 
-GIT_ATTR_GLOBAL::
+`GIT_ATTR_GLOBAL`::
     The path to the global (per-user) linkgit:gitattributes[5] file.
 
-GIT_CONFIG_SYSTEM::
+`GIT_CONFIG_SYSTEM`::
     The path to the system configuration file, if one is enabled.
 
-GIT_CONFIG_GLOBAL::
+`GIT_CONFIG_GLOBAL`::
     The path to the global (per-user) configuration files, if any.
 
 Most path values contain only one value. However, some can contain multiple
-- 
2.48.0
Previous: Jean-Noël Avila
Message 26 of 26 in “A handful of doc synopsis/options update”
  1. 0/4 A handful of doc synopsis/options updateJunio C Hamano, May 1, 2025
  2. 1/4 git-verify-* doc: update mark-up of synopsis option descriptionsJunio C Hamano, May 1, 2025
  3. Eric SunshineMay 1, 2025
  4. Junio C HamanoMay 1, 2025
  5. 2/4 git-{var,write-tree} docs: update mark-up of synopsis option descriptionsJunio C Hamano, May 1, 2025
  6. 3/4 git-daemon doc: update mark-up of synopsis option descriptionsJunio C Hamano, May 1, 2025
  7. Eric SunshineMay 1, 2025
  8. Junio C HamanoMay 1, 2025
  9. Junio C HamanoMay 1, 2025
  10. 4/4 git-worktree doc: update mark-up of synopsis option descriptionsJunio C Hamano, May 1, 2025
  11. 0/3 A handful of doc synopsis/options updateJunio C Hamano, May 3, 2025
  12. 1/3 git-verify-* doc: update mark-up of synopsis option descriptionsJunio C Hamano, May 3, 2025
  13. 2/3 git-{var,write-tree} docs: update mark-up of synopsis option descriptionsJunio C Hamano, May 3, 2025
  14. 3/3 git-daemon doc: update mark-up of synopsis option descriptionsJunio C Hamano, May 3, 2025
  15. Additional changesJean-Noël Avila, May 7, 2025
  16. Additional changesJean-Noël Avila, May 7, 2025
  17. Junio C HamanoMay 8, 2025
  18. Jean-Noël AVILAMay 9, 2025
  19. Junio C HamanoMay 9, 2025
  20. Jean-Noël AVILAMay 9, 2025
  21. Junio C HamanoMay 9, 2025
  22. 0/4 Additional changesJean-Noël Avila, May 10, 2025
  23. 1/4 git-daemon doc: update mark-up of synopsis option descriptionsJean-Noël Avila, May 10, 2025
  24. 2/4 git-{var,write-tree} docs: update mark-up of synopsis option descriptionsJean-Noël Avila, May 10, 2025
  25. 3/4 git-verify-* doc: update mark-up of synopsis option descriptionsJean-Noël Avila, May 10, 2025
  26. 4/4 git-var doc: fix usage of $ENV_VAR vs ENV_VARJean-Noël Avila, May 10, 2025

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.