]> git.ipfire.org Git - thirdparty/git.git/commit
line-log: allow non-patch diff formats with -L
authorMichael Montalbo <mmontalbo@gmail.com>
Thu, 28 May 2026 20:47:46 +0000 (20:47 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 May 2026 05:06:21 +0000 (14:06 +0900)
commit4b5d8a0163fe4e9a4ac074f407e0599ba27acf68
treed66dc20f4550a4af501b65db34b4846590006094
parent42d960748efa79a31e72cc36d983aca244dc167e
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