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

[PATCH v2 2/5] config: use --value=<pattern> consistently

From
Kkristofferhaugsbakk@fastmail.com <kristofferhaugsbakk@fastmail.com>
Date
Jul 1, 2025, 15:14 UTC
Message-ID
<fa183e470c52aed223d284f17a222a02edaeaad2.1751382830.git.code@khaugsbakk.name>
In-Reply-To
<cover.1751382830.git.code@khaugsbakk.name>
From: Kristoffer Haugsbakk <code@khaugsbakk.name>

This option was introduced in a series of commits from fe3ccc7aab (Merge branch 'ps/config-subcommands', 2024-05-15). But two styles were used for the value provided to the option:

1. Synopsis: `--value=<value>`
2. Deprecated Modes: `--value=<pattern>`
(2) is also used in the synopsis on the command.

Use (2) consistently throughout since it’s a pattern in the general case (`value` sounds more generic).

Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Notes (series):
    v2:
    • Unbreak t/t0450-txt-doc-vs-help.sh caused by source/doc synopsis being
      out of synch
    • Replaced the rest that I missed
 Documentation/git-config.adoc |  6 +++---
 builtin/config.c              | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Documentation/git-config.adoc b/Documentation/git-config.adoc
index e05bf813d46..d3ddc538555 100644
--- a/Documentation/git-config.adoc
+++ b/Documentation/git-config.adoc
@@ -10,9 +10,9 @@ SYNOPSIS
 --------
 [verse]
 'git config list' [<file-option>] [<display-option>] [--includes]
-'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>
-'git config set' [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>
-'git config unset' [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>
+'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<pattern>] [--fixed-value] [--default=<default>] <name>
+'git config set' [<file-option>] [--type=<type>] [--all] [--value=<pattern>] [--fixed-value] <name> <value>
+'git config unset' [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name>
 'git config rename-section' [<file-option>] <old-name> <new-name>
 'git config remove-section' [<file-option>] <name>
 'git config edit' [<file-option>]
diff --git a/builtin/config.c b/builtin/config.c
index f70d6354772..706269647e5 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -17,9 +17,9 @@
 
 static const char *const builtin_config_usage[] = {
 	N_("git config list [<file-option>] [<display-option>] [--includes]"),
-	N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>"),
-	N_("git config set [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
-	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"),
+	N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<pattern>] [--fixed-value] [--default=<default>] <name>"),
+	N_("git config set [<file-option>] [--type=<type>] [--all] [--value=<pattern>] [--fixed-value] <name> <value>"),
+	N_("git config unset [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name>"),
 	N_("git config rename-section [<file-option>] <old-name> <new-name>"),
 	N_("git config remove-section [<file-option>] <name>"),
 	N_("git config edit [<file-option>]"),
@@ -33,17 +33,17 @@ static const char *const builtin_config_list_usage[] = {
 };
 
 static const char *const builtin_config_get_usage[] = {
-	N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp=<regexp>] [--value=<value>] [--fixed-value] [--default=<default>] <name>"),
+	N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp=<regexp>] [--value=<pattern>] [--fixed-value] [--default=<default>] <name>"),
 	NULL
 };
 
 static const char *const builtin_config_set_usage[] = {
-	N_("git config set [<file-option>] [--type=<type>] [--comment=<message>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
+	N_("git config set [<file-option>] [--type=<type>] [--comment=<message>] [--all] [--value=<pattern>] [--fixed-value] <name> <value>"),
 	NULL
 };
 
 static const char *const builtin_config_unset_usage[] = {
-	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"),
+	N_("git config unset [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name>"),
 	NULL
 };
 
-- 
2.50.0.136.g303b50f9132
Previous: kristofferhaugsbakk@fastmail.comNext: kristofferhaugsbakk@fastmail.com
Message 18 of 22 in “doc: config: update for the ps/config-subcommands series”
  1. 0/5 doc: config: update for the ps/config-subcommands serieskristofferhaugsbakk@fastmail.com, Jun 30, 2025
  2. 1/5 doc: config: document --[no-]show-nameskristofferhaugsbakk@fastmail.com, Jun 30, 2025
  3. 2/5 doc: config: use --value=<pattern> consistentlykristofferhaugsbakk@fastmail.com, Jun 30, 2025
  4. Kristoffer HaugsbakkJul 1, 2025
  5. Kristoffer HaugsbakkJul 1, 2025
  6. 3/5 doc: config: document --[no-]valuekristofferhaugsbakk@fastmail.com, Jun 30, 2025
  7. Eric SunshineJun 30, 2025
  8. 4/5 doc: config: use --value instead of value-patternkristofferhaugsbakk@fastmail.com, Jun 30, 2025
  9. 5/5 doc: config: mention --url in the synopsiskristofferhaugsbakk@fastmail.com, Jun 30, 2025
  10. Kristoffer HaugsbakkJul 1, 2025
  11. Junio C HamanoJun 30, 2025
  12. Kristoffer HaugsbakkJul 1, 2025
  13. Patrick SteinhardtJul 1, 2025
  14. Kristoffer HaugsbakkJul 1, 2025
  15. Junio C HamanoJul 1, 2025
  16. 0/5 doc: config: update for the ps/config-subcommands serieskristofferhaugsbakk@fastmail.com, Jul 1, 2025
  17. 1/5 doc: config: document --[no-]show-nameskristofferhaugsbakk@fastmail.com, Jul 1, 2025
  18. 2/5 config: use --value=<pattern> consistentlykristofferhaugsbakk@fastmail.com, Jul 1, 2025
  19. 3/5 doc: config: document --[no-]valuekristofferhaugsbakk@fastmail.com, Jul 1, 2025
  20. 4/5 doc: config: use --value instead of value-patternkristofferhaugsbakk@fastmail.com, Jul 1, 2025
  21. 5/5 config: mention --url in the synopsiskristofferhaugsbakk@fastmail.com, Jul 1, 2025
  22. Junio C HamanoJul 1, 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.