summaryrefslogtreecommitdiff
path: root/t/t4018/php-abstract-class
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-11-12 14:02:56 -0800
committerJunio C Hamano <gitster@pobox.com>2025-11-12 14:04:04 -0800
commit9fb15a8e1430b77e2cc771e425ce4f0954ce4777 (patch)
tree597a31d17d44891390c6f9d4b989ddcd462a2b7c /t/t4018/php-abstract-class
parenta675104c399d242dd3ff5a0823fcd770563cf60f (diff)
apply: check and fix incomplete lines
The final line of a file that lacks the terminating newline at its end is called an incomplete line. In general they are frowned upon for many reasons (imagine concatenating two files with "cat A B" and what happens when A ends in an incomplete line, for example), and text-oriented tools often mishandle such a line. Implement checks in "git apply" for incomplete lines, which is off by default for backward compatibility's sake, so that "git apply --whitespace={fix,warn,error}" can notice, warn against, and fix them. As one of the new test shows, if you modify contents on an incomplete line in the original and leave the resulting line incomplete, it is still considered a whitespace error, the reasoning being that "you'd better fix it while at it if you are making a change on an incomplete line anyway", which may controversial. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018/php-abstract-class')
0 files changed, 0 insertions, 0 deletions