]> git.ipfire.org Git - thirdparty/git.git/commit
last-modified: document option '-z'
authorToon Claes <toon@iotcl.com>
Tue, 20 Jan 2026 21:47:09 +0000 (22:47 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Jan 2026 22:13:04 +0000 (14:13 -0800)
commit209574de2d2ab0a264522c8c44c3eebb6d03ec43
tree56c0fdbe4e22735e8e13a582bba89f31acfa5abc
parentb143f0f60816bbb2095eadc15d81b49c131f6a19
last-modified: document option '-z'

The command git-last-modified(1) already recognizes the option '-z', and
similar to many other commands this will make the output NUL-terminated
instead of using newlines. Although, this option is missing from the
documentation, so add it.

In addition to that, to have '-z' also appear in the help output of `git
last-modified -h`, move the handling of '-z' to parse_options() in
builtin/last-modified.c itself.

Before, the parsing of option '-z' was done by diff_opt_parse(), which
is called by setup_revisions(). That would fill in `struct
diff_options::line_termination`, but that field was not used by the diff
machinery itself. Thus it makes more sense to have the handling of that
option completely in builtin/last-modified.c.

Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-last-modified.adoc
builtin/last-modified.c