]> git.ipfire.org Git - thirdparty/git.git/commit - git-add--interactive.perl
add -p: fix counting when splitting and coalescing
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Mon, 5 Mar 2018 10:56:29 +0000 (10:56 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Mar 2018 18:45:41 +0000 (10:45 -0800)
commitb3e0fcfe429204ccdf1f6977c55127171d65a8e5
treee06dcb66e45993aa3e2c0bc775ce1826f8b85331
parent2b8ea7f3c7d8dfd4f1eddaef6688b51f8106767e
add -p: fix counting when splitting and coalescing

When a file has no trailing new line at the end diff records this by
appending "\ No newline at end of file" below the last line of the
file. This line should not be counted in the hunk header. Fix the
splitting and coalescing code to count files without a trailing new line
properly and change one of the tests to test splitting without a
trailing new line.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl
t/t3701-add-interactive.sh