]> Kevux Git Server - rit/commit
rev-parse: allow printing compatibility hash
authorbrian m. carlson <sandals@crustytoothpaste.net>
Thu, 9 Oct 2025 21:56:23 +0000 (21:56 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Oct 2025 00:46:14 +0000 (17:46 -0700)
commitb95c59e21e6afeddc56400e162e818a9312f04d2
tree040fea1673e4ad558b59c87b3a21bbecbc4dc94a
parentd4f439548d46dd93087af8d9ff2e9f7e4d5e98bb
rev-parse: allow printing compatibility hash

Right now, we have a way to print the storage hash, the input hash, and
the output hash, but we lack a way to print the compatibility hash.  Add
a new type to --show-object-format, compat, which prints this value.

If no compatibility hash exists, simply print a newline.  This is
important to allow users to use multiple options at once while still
getting unambiguous output.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-rev-parse.adoc
builtin/rev-parse.c
t/t1500-rev-parse.sh