]> git.ipfire.org Git - thirdparty/git.git/commit
rev-list: support NUL-delimited --missing option
authorJustin Tobler <jltobler@gmail.com>
Wed, 19 Mar 2025 18:34:10 +0000 (13:34 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Mar 2025 10:40:03 +0000 (03:40 -0700)
commit340e7523c035bef9a1ab95ca6ced58fe9cb35063
tree44199853d636d13ff473c579f62aa8528fadb16e
parent1c3c1ab3d2a9558050ef6beee0a416700f6b953f
rev-list: support NUL-delimited --missing option

The `--missing={print,print-info}` option for git-rev-list(1) prints
missing objects found while performing the object walk in the form:

        $ git rev-list --missing=print-info <rev>
        ?<oid> [SP <token>=<value>]... LF

Add support for printing missing objects in a NUL-delimited format when
the `-z` option is enabled.

        $ git rev-list -z --missing=print-info <rev>
        <oid> NUL missing=yes NUL [<token>=<value> NUL]...

In this mode, values containing special characters or spaces are printed
as-is without being escaped or quoted. Instead of prefixing the missing
OID with '?', a separate `missing=yes` token/value pair is appended.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/rev-list-options.adoc
builtin/rev-list.c
t/t6022-rev-list-missing.sh