Code

Fix apply --recount handling of no-EOL line
authorThomas Rast <trast@student.ethz.ch>
Fri, 4 Jul 2008 19:10:14 +0000 (21:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 5 Jul 2008 07:37:44 +0000 (00:37 -0700)
commit6cf91492d9cd985e1fa65181d99d6d578d4439dc
tree167f08ae051d73ec55e1add3b85efa6fd370fe60
parent7dde4bb3674da53dd9e33c741bea3fe680690a0d
Fix apply --recount handling of no-EOL line

If a patch modifies the last line of a file that previously had no
terminating '\n', it looks like

    -old text
    \ No newline at end of file
    +new text

Hence, a '\' line does not signal the end of the hunk.  This modifies
'git apply --recount' to take this into account.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-apply.c
t/t4100-apply-stat.sh
t/t4100/t-apply-8.expect [new file with mode: 0644]
t/t4100/t-apply-8.patch [new file with mode: 0644]
t/t4100/t-apply-9.expect [new file with mode: 0644]
t/t4100/t-apply-9.patch [new file with mode: 0644]