]> git.ipfire.org Git - thirdparty/git.git/commit
cat-file: add %(objectmode) atom
authorVictoria Dye <vdye@github.com>
Mon, 2 Jun 2025 18:55:54 +0000 (18:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2025 19:08:58 +0000 (12:08 -0700)
commitaba14384354c6f722c127962bc756a542078f3e3
treec5935c314be564004463065a580466bffc2dab74
parent9fd38038b9cf7d221bfa2d2ee95c8fad6d8b3d64
cat-file: add %(objectmode) atom

Add a formatting atom, used with the --batch-check/--batch-command options,
that prints the octal representation of the object mode if a given revision
includes that information, e.g. one that follows the format
<tree-ish>:<path>. If the mode information does not exist, an empty string
is printed instead.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-cat-file.adoc
builtin/cat-file.c
t/t1006-cat-file.sh