aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-rev-parse.txt
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2023-10-01 21:40:26 -0500
committerJunio C Hamano <gitster@pobox.com>2023-10-02 14:57:40 -0700
commitd7446c89b8ed57f1fa0a5b2ea5e4b7e5fcb7d9cd (patch)
tree84aefe400f967e0a773199e42b4f01bdfa2681a9 /Documentation/git-rev-parse.txt
parent9ae702faf151802f481e68db8d5cb5b536b31c2a (diff)
downloadgit-d7446c89b8ed57f1fa0a5b2ea5e4b7e5fcb7d9cd.tar.gz
rev-parse: add an --output-object-format parameter
The new --output-object-format parameter returns the oid in the specified format. This is a generally useful plumbing facility. It is useful for writing test cases and for directly querying the translation maps. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rev-parse.txt')
-rw-r--r--Documentation/git-rev-parse.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index f26a7591e3..f0f9021f2a 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -159,6 +159,18 @@ for another option.
unfortunately named tag "master"), and show them as full
refnames (e.g. "refs/heads/master").
+--output-object-format=(sha1|sha256|storage)::
+
+ Allow oids to be input from any object format that the current
+ repository supports.
+
+ Specifying "sha1" translates if necessary and returns a sha1 oid.
+
+ Specifying "sha256" translates if necessary and returns a sha256 oid.
+
+ Specifying "storage" translates if necessary and returns an oid in
+ encoded in the storage hash algorithm.
+
Options for Objects
~~~~~~~~~~~~~~~~~~~