aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/repo.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-12-14 17:04:37 +0900
committerJunio C Hamano <gitster@pobox.com>2025-12-14 17:04:37 +0900
commitaffdbe41bdb537197d50e2db7e18cb94a3058761 (patch)
treef0d5519917332f552211c965ccd4c71ec11691fe /builtin/repo.c
parent2378ebcb588cb08fc2a353fbfd1891ce53d15d54 (diff)
parent76c0704bdf6ee8ac0be11830cb6ae8d08cc587a8 (diff)
downloadgit-affdbe41bdb537197d50e2db7e18cb94a3058761.tar.gz
Merge branch 'lo/repo-struct-z'
"git repo struct" learned to take "-z" as a synonym to "--format=nul". * lo/repo-struct-z: repo: add -z as an alias for --format=nul to git-repo-structure repo: use [--format=... | -z] instead of [-z] in git-repo-info synopsis repo: remove blank line from Documentation/git-repo.adoc
Diffstat (limited to 'builtin/repo.c')
-rw-r--r--builtin/repo.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin/repo.c b/builtin/repo.c
index 2a653bd3ea..0dd41b1778 100644
--- a/builtin/repo.c
+++ b/builtin/repo.c
@@ -15,8 +15,8 @@
#include "utf8.h"
static const char *const repo_usage[] = {
- "git repo info [--format=(keyvalue|nul)] [-z] [--all | <key>...]",
- "git repo structure [--format=(table|keyvalue|nul)]",
+ "git repo info [--format=(keyvalue|nul) | -z] [--all | <key>...]",
+ "git repo structure [--format=(table|keyvalue|nul) | -z]",
NULL
};
@@ -529,6 +529,10 @@ static int cmd_repo_structure(int argc, const char **argv, const char *prefix,
OPT_CALLBACK_F(0, "format", &format, N_("format"),
N_("output format"),
PARSE_OPT_NONEG, parse_format_cb),
+ OPT_CALLBACK_F('z', NULL, &format, NULL,
+ N_("synonym for --format=nul"),
+ PARSE_OPT_NONEG | PARSE_OPT_NOARG,
+ parse_format_cb),
OPT_BOOL(0, "progress", &show_progress, N_("show progress")),
OPT_END()
};