patch: fix matching failure
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 21 Nov 2016 22:19:51 +0000 (00:19 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 24 Nov 2016 10:40:36 +0000 (11:40 +0100)
commitcb810c48c036f50c19b08df7e161cdb0550a2abd
treefe18bf724cb5c53ae9861e778bbf6db1bce712f6
parent2eff59667d3c590f27ee39cd0969b2221af739a0
patch: fix matching failure

Fix matching failure when plist is advanced while checking for buffered
lines - the lines in the hunk that are about to be added should be
skipped when checking for matching context.

Also add a valid test case that fails with current busybox and is fixed
by the change.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/patch.c
testsuite/patch.tests