Files
git/xdiff
René Scharfe 6d5badb238 xdiff: handle appended chunks better with -W
If lines are added at the end of a file, diff -W shows the whole file.
That's because get_func_line() only considers the pre-image and gives up
if it sees a record index beyond its end.

Consider the post-image as well to see if the added lines already make
up a full function.  If it doesn't then search for the previous function
line by starting from the bottom of the pre-image, thereby avoiding to
confuse get_func_line().

Reuse the existing label called "again", as it's exactly where we need
to jump to when we're done handling the pre-context, but rename it to
"post_context_calculation" in order to document its new purpose better.

Reported-by: Junio C Hamano <gitster@pobox.com>
Initial-patch-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31 13:08:56 -07:00
..
2016-02-22 22:36:09 -08:00
2013-06-19 15:17:45 -07:00
2013-06-19 15:17:45 -07:00
2013-06-19 15:17:45 -07:00
2016-02-26 13:37:22 -08:00
2013-06-19 15:17:45 -07:00
2013-06-19 15:17:45 -07:00