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

[PATCH v2 2/5] for-each-ref: fix documentation argument ordering

From
Karthik Nayak <karthik.188@gmail.com>
Date
Jul 28, 2025, 20:20 UTC
Message-ID
<20250728-kn-small-cleanups-v2-2-d3021c8bf471@gmail.com>
In-Reply-To
<20250728-kn-small-cleanups-v2-0-d3021c8bf471@gmail.com>
Improve the 'git-for-each-ref(1)' documentation with two corrections:
1. Add parentheses around `--exclude=<pattern>` to indicate this option
   can be repeated as a complete unit.
2. Move `--stdin | <pattern> ...` to the end, after all flags, since
   `<pattern>` is a positional argument that should appear last in the
   argument list.

While here, change to using the synopsis block which will automatically format placeholders in italics and keywords in monospace.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---
 Documentation/git-for-each-ref.adoc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Documentation/git-for-each-ref.adoc b/Documentation/git-for-each-ref.adoc
index ae61ba642a..ec3b10e14a 100644
--- a/Documentation/git-for-each-ref.adoc
+++ b/Documentation/git-for-each-ref.adoc
@@ -7,14 +7,14 @@ git-for-each-ref - Output information on each ref
 
 SYNOPSIS
 --------
-[verse]
-'git for-each-ref' [--count=<count>] [--shell|--perl|--python|--tcl]
+[synopsis]
+git for-each-ref [--count=<count>] [--shell|--perl|--python|--tcl]
 		   [(--sort=<key>)...] [--format=<format>]
-		   [--include-root-refs] [ --stdin | <pattern>... ]
-		   [--points-at=<object>]
+		   [--include-root-refs] [--points-at=<object>]
 		   [--merged[=<object>]] [--no-merged[=<object>]]
 		   [--contains[=<object>]] [--no-contains[=<object>]]
-		   [--exclude=<pattern> ...] [--start-after=<marker>]
+		   [(--exclude=<pattern>)...] [--start-after=<marker>]
+		   [ --stdin | <pattern>... ]
 
 DESCRIPTION
 -----------
-- 
2.50.0
Previous: Karthik NayakNext: Karthik Nayak
Message 18 of 22 in “ref-filter: small cleanups and fixes”
  1. 0/5 ref-filter: small cleanups and fixesKarthik Nayak, Jul 24, 2025
  2. 1/5 ref-cache: use 'size_t' instead of int for lengthKarthik Nayak, Jul 24, 2025
  3. Junio C HamanoJul 24, 2025
  4. 2/5 for-each-ref: fix documentation argument orderingKarthik Nayak, Jul 24, 2025
  5. Junio C HamanoJul 24, 2025
  6. Karthik NayakJul 24, 2025
  7. Junio C HamanoJul 24, 2025
  8. Karthik NayakJul 28, 2025
  9. Patrick SteinhardtJul 25, 2025
  10. Karthik NayakJul 28, 2025
  11. 3/5 for-each-ref: reword the documentation for '--start-after'Karthik Nayak, Jul 24, 2025
  12. Patrick SteinhardtJul 25, 2025
  13. 4/5 t6302: add test combining '--start-after' with '--exclude'Karthik Nayak, Jul 24, 2025
  14. 5/5 ref-filter: use REF_ITERATOR_SEEK_SET_PREFIX instead of '1'Karthik Nayak, Jul 24, 2025
  15. Junio C HamanoJul 24, 2025
  16. 0/5 ref-filter: small cleanups and fixesKarthik Nayak, Jul 28, 2025
  17. 1/5 ref-cache: use 'size_t' instead of int for lengthKarthik Nayak, Jul 28, 2025
  18. 2/5 for-each-ref: fix documentation argument orderingKarthik Nayak, Jul 28, 2025
  19. 3/5 for-each-ref: reword the documentation for '--start-after'Karthik Nayak, Jul 28, 2025
  20. 4/5 t6302: add test combining '--start-after' with '--exclude'Karthik Nayak, Jul 28, 2025
  21. 5/5 ref-filter: use REF_ITERATOR_SEEK_SET_PREFIX instead of '1'Karthik Nayak, Jul 28, 2025
  22. Patrick SteinhardtJul 29, 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.