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

[PATCH v2 1/5] doc: config: document --[no-]show-names

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

These options were introduced in 4e513890008 (builtin/config: introduce "get" subcommand, 2024-05-06) but not documented here. Use the description from the source code.

Document this option and the negated form according to the current convention.[1]

`--show-names` is also the default when `--get-regexp` is given. But don’t mention it here since all the deprecated modes are quarantined in the “Deprecated Modes” section.

[1]: https://lore.kernel.org/git/xmqqcyct1mtq.fsf@gitster.g/
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Notes (series):
    >The default is `--no-show-names` unless `--url` is given and there are
    > no subsections in _<name>_.
    
    See: d4770964d50 (config: "git config --get-urlmatch" parses
    section.<url>.key, 2013-07-31)
 Documentation/git-config.adoc | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/Documentation/git-config.adoc b/Documentation/git-config.adoc
index 936e0c5130f..e05bf813d46 100644
--- a/Documentation/git-config.adoc
+++ b/Documentation/git-config.adoc
@@ -259,6 +259,12 @@ Valid `<type>`'s include:
 	Output only the names of config variables for `list` or
 	`get`.
 
+`--show-names`::
+`--no-show-names`::
+	With `get`, show config keys in addition to their values. The
+	default is `--no-show-names` unless `--url` is given and there
+	are no subsections in _<name>_.
+
 --show-origin::
 	Augment the output of all queried config options with the
 	origin type (file, standard input, blob, command line) and
-- 
2.50.0.136.g303b50f9132
Previous: kristofferhaugsbakk@fastmail.comNext: kristofferhaugsbakk@fastmail.com
Message 17 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.