]> git.ipfire.org Git - thirdparty/git.git/commit
line-log: allow non-patch diff formats with -L
authorMichael Montalbo <mmontalbo@gmail.com>
Mon, 25 May 2026 19:40:58 +0000 (19:40 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 May 2026 22:57:50 +0000 (07:57 +0900)
commit91e26211aa8d1afa64959b506422a8085e6b19b5
treed2bb7732a4237b845be9dec903e5bbc7070334a2
parent2b240d4281b8d517c23b6f163103c91f32fa34ff
line-log: allow non-patch diff formats with -L

Now that -L flows through log_tree_diff_flush() and diff_flush(),
metadata-only diff formats work because they only read filepair
fields (status, mode, path, oid) already set on the pre-computed
pairs.

Expand the allowlist in setup_revisions() to also accept --raw,
--name-only, --name-status, and --summary.  Diff stat formats
(--stat, --numstat, --shortstat, --dirstat) remain blocked because
they call compute_diffstat() on full blob content and would show
whole-file statistics rather than range-scoped ones.

Signed-off-by: Michael Montalbo <mmontalbo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/line-range-options.adoc
revision.c
t/t4211-line-log.sh