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

[PATCH] git-config: fix misworded --type=path explanation

From
Evan Gates <evan.gates@gmail.com>
Date
Sep 15, 2023, 20:24 UTC
Message-ID
<20230915202610.21206-1-evan.gates@gmail.com>

When `--type=<type>` was added as a prefered alias for `--<type>` the explanation for the path type was reworded. Whereas the previous explanation said "expand a leading `~`" this was changed to "adding a leading `~`". Change "adding" to "expanding" to correctly explain the canonicalization.

Fixes: fb0dc3bac1 (builtin/config.c: support `--type=<type>` as preferred alias for `--<type>`)
Signed-off-by: Evan Gates <evan.gates@gmail.com>
---

Turns out --type=path is exactly what I had been looking for, but it took some experimentation as I found the documentation confusing. In hindsight it's obvious, but I hope this simple fix helps someone else figure it out faster in the future.

 Documentation/git-config.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 7a2bcb2f6c..b1caac887a 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -201,7 +201,7 @@ Valid `<type>`'s include:
   1073741824 upon input.
 - 'bool-or-int': canonicalize according to either 'bool' or 'int', as described
   above.
-- 'path': canonicalize by adding a leading `~` to the value of `$HOME` and
+- 'path': canonicalize by expanding a leading `~` to the value of `$HOME` and
   `~user` to the home directory for the specified user. This specifier has no
   effect when setting the value (but you can use `git config section.variable
   ~/` from the command line to let your shell do the expansion.)
-- 
2.42.0
Next: Jeff King
Message 1 of 3 in “git-config: fix misworded --type=path explanation”
  1. git-config: fix misworded --type=path explanationEvan Gates, Sep 15, 2023
  2. Jeff KingSep 16, 2023
  3. Junio C HamanoSep 16, 2023

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.