aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-repo.adoc
diff options
context:
space:
mode:
authorLucas Seiki Oshiro <lucasseikioshiro@gmail.com>2025-09-04 10:40:16 -0300
committerJunio C Hamano <gitster@pobox.com>2025-09-04 11:36:39 -0700
commita92f5ca0d5c1b27f70a519efba967d613fd48a7a (patch)
tree6c40ab17d68988c5be5c597f48aab7b183d71978 /Documentation/git-repo.adoc
parentMerge branch 'lo/repo-info' into lo/repo-info-step-2 (diff)
downloadgit-a92f5ca0d5c1b27f70a519efba967d613fd48a7a.tar.gz
git-a92f5ca0d5c1b27f70a519efba967d613fd48a7a.zip
repo: add the flag -z as an alias for --format=nul
Other Git commands that have nul-terminated output (e.g. git-config, git-status, git-ls-files) have a flag `-z` for using the null character as the record separator. Add the `-z` flag to git-repo-info as an alias for `--format=nul`, making it consistent with the behavior of the other commands. Mentored-by: Karthik Nayak <karthik.188@gmail.com> Mentored-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-repo.adoc')
-rw-r--r--Documentation/git-repo.adoc6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/git-repo.adoc b/Documentation/git-repo.adoc
index 2870828d93..6f5ee88215 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)] [<key>...]
+git repo info [--format=(keyvalue|nul)] [-z] [<key>...]
DESCRIPTION
-----------
@@ -18,7 +18,7 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
COMMANDS
--------
-`info [--format=(keyvalue|nul)] [<key>...]`::
+`info [--format=(keyvalue|nul)] [-z] [<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).
@@ -40,6 +40,8 @@ supported:
between the key and the value and using a NUL character after each value.
This format is better suited for being parsed by another applications than
`keyvalue`. Unlike in the `keyvalue` format, the values are never quoted.
++
+`-z` is an alias for `--format=nul`.
INFO KEYS
---------