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

[PATCH v2 2/3] repo: use [--format=... | -z] instead of [-z] in git-repo-info synopsis

From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Date
Dec 4, 2025, 20:10 UTC
Message-ID
<20251204210843.79411-3-lucasseikioshiro@gmail.com>
In-Reply-To
<20251204210843.79411-1-lucasseikioshiro@gmail.com>

The flag -z is only an alias for --format=null and even though --format and -z can be used together and repeated, only the last one is considered.

Replace `[-z]` in the synopsis of git-repo-info by `[--format=... | -z]`, expliciting that the use of one of those flags replace the other.

Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
---
 Documentation/git-repo.adoc | 4 ++--
 builtin/repo.c              | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-repo.adoc b/Documentation/git-repo.adoc
index 5d9c7641c2..f24514deaa 100644
--- a/Documentation/git-repo.adoc
+++ b/Documentation/git-repo.adoc
@@ -8,7 +8,7 @@ git-repo - Retrieve information about the repository
 SYNOPSIS
 --------
 [synopsis]
-git repo info [--format=(keyvalue|nul)] [-z] [--all | <key>...]
+git repo info [--format=(keyvalue|nul) | -z] [--all | <key>...]
 git repo structure [--format=(table|keyvalue|nul)]
 
 DESCRIPTION
@@ -19,7 +19,7 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
 
 COMMANDS
 --------
-`info [--format=(keyvalue|nul)] [-z] [--all | <key>...]`::
+`info [--format=(keyvalue|nul) | -z] [--all | <key>...]`::
 	Retrieve metadata-related information about the current repository. Only
 	the requested data will be returned based on their keys (see "INFO KEYS"
 	section below).
diff --git a/builtin/repo.c b/builtin/repo.c
index 2a653bd3ea..cc97dd1836 100644
--- a/builtin/repo.c
+++ b/builtin/repo.c
@@ -15,7 +15,7 @@
 #include "utf8.h"
 
 static const char *const repo_usage[] = {
-	"git repo info [--format=(keyvalue|nul)] [-z] [--all | <key>...]",
+	"git repo info [--format=(keyvalue|nul) | -z] [--all | <key>...]",
 	"git repo structure [--format=(table|keyvalue|nul)]",
 	NULL
 };
-- 
2.50.1 (Apple Git-155)
Previous: Lucas Seiki OshiroNext: Lucas Seiki Oshiro
Message 11 of 15 in “repo: add -z as an alias for --format=nul to git-repo-structure”
  1. repo: add -z as an alias for --format=nul to git-repo-structureLucas Seiki Oshiro, Nov 30, 2025
  2. Junio C HamanoDec 1, 2025
  3. Patrick SteinhardtDec 1, 2025
  4. Lucas Seiki OshiroDec 1, 2025
  5. Junio C HamanoDec 2, 2025
  6. Lucas Seiki OshiroDec 2, 2025
  7. Justin ToblerDec 1, 2025
  8. Lucas Seiki OshiroDec 2, 2025
  9. 0/3 repo: add -z as an alias for --format=nul to git-repo-structureLucas Seiki Oshiro, Dec 4, 2025
  10. 1/3 repo: remove blank line from Documentation/git-repo.adocLucas Seiki Oshiro, Dec 4, 2025
  11. 2/3 repo: use [--format=... | -z] instead of [-z] in git-repo-info synopsisLucas Seiki Oshiro, Dec 4, 2025
  12. 3/3 repo: add -z as an alias for --format=nul to git-repo-structureLucas Seiki Oshiro, Dec 4, 2025
  13. Junio C HamanoDec 11, 2025
  14. Lucas Seiki OshiroDec 18, 2025
  15. Patrick SteinhardtDec 5, 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.