]> git.ipfire.org Git - thirdparty/git.git/commit
xdiff: unignore changes in function context
authorRené Scharfe <l.s.r@web.de>
Thu, 5 Dec 2019 16:15:31 +0000 (17:15 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Dec 2019 17:30:06 +0000 (09:30 -0800)
commit0bb313a5529390276cf5c415891c804dea44fa34
tree51c4771d7f12a0c935e07d581873b00e3c58c93d
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
xdiff: unignore changes in function context

Changes involving only blank lines are hidden with --ignore-blank-lines,
unless they appear in the context lines of other changes.  This is
handled by xdl_get_hunk() for context added by --inter-hunk-context, -u
and -U.

Function context for -W and --function-context added by xdl_emit_diff()
doesn't pay attention to such ignored changes; it relies fully on
xdl_get_hunk() and shows just the post-image of ignored changes
appearing in function context.  That's inconsistent and confusing.

Improve the result of using --ignore-blank-lines and --function-context
together by fully showing ignored changes if they happen to fall within
function context.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4015-diff-whitespace.sh
xdiff/xemit.c