]> git.ipfire.org Git - thirdparty/git.git/commit
line-log: consult diff process for range tracking
authorMichael Montalbo <mmontalbo@gmail.com>
Sun, 26 Jul 2026 18:51:28 +0000 (18:51 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 26 Jul 2026 21:03:54 +0000 (14:03 -0700)
commitc28f4a3db52cb57d18b618e2d974514eef969d5f
tree019778ad849047dd3806dce15905469e37d09fd5
parent4c0cd15ffc3b18ca472316c846a5660dde3aa3fc
line-log: consult diff process for range tracking

git log -L tracks line ranges by diffing each commit against its
parent in collect_diff().  This pass used the builtin diff while the
displayed diff (builtin_diff()) consults a configured
diff.<driver>.process, so the two could disagree: a reformat-only
commit selected by builtin tracking was then rendered with an empty
diff because the tool reported the files equivalent.

Consult the process in collect_diff() too, mirroring the blame
integration.  When the tool reports the files equivalent, collect no
ranges; the tracked range then maps across unchanged and the commit
drops out of the log, matching what is displayed.  Like the summary
formats, the tracking pass diffs raw content, so the tool is consulted
on the raw blobs here.

Signed-off-by: Michael Montalbo <mmontalbo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/gitattributes.adoc
line-log.c
t/t4080-diff-process.sh