xdiff -W: relax end-of-file function detection
authorVegard Nossum <vegard.nossum@oracle.com>
Fri, 13 Jan 2017 16:15:10 +0000 (17:15 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jan 2017 00:08:11 +0000 (16:08 -0800)
commit540d3eb0ebad425f0902cbca0549288fe627f058
tree8016810831e1153f0d53e1e209000c3f8216e055
parentd7dffce1cebde29a0c4b309a79e4345450bf352a
xdiff -W: relax end-of-file function detection

When adding a new function to the end of a file, it's enough to know
that 1) the addition is at the end of the file; and 2) there is a
function _somewhere_ in there.

If we had simply been changing the end of an existing function, then we
would also be deleting something from the old version.

This fixes the case where we add e.g.

// Begin of dummy
static int dummy(void)
{
}

to the end of the file.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Acked-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xemit.c