xdiff: -W: don't include common trailing empty lines in context
commit9e6a4cfc38aa81055d0b7d6fb94dc7b31809daa9
authorRené Scharfe <l.s.r@web.de>
Sat, 28 May 2016 15:03:16 +0000 (28 17:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 May 2016 20:08:56 +0000 (31 13:08 -0700)
treee03053b418d6223b8fa33714e43037e5ba7524b5
parent392f6d316623e8ecd6210248ba9ae2cabf07352b
xdiff: -W: don't include common trailing empty lines in context

Empty lines between functions are shown by diff -W, as it considers them
to be part of the function preceding them.  They are not interesting in
most languages.  The previous patch stopped showing them in the special
case of a function added at the end of a file.

Stop extending context to those empty lines by skipping back over them
from the start of the next function.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4051-diff-function-context.sh
xdiff/xemit.c