apply: handle Subversion diffs with /dev/null gracefully
authorTatyana Krasnukha <tatyana@synopsys.com>
Thu, 15 Feb 2018 00:29:34 +0000 (01:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Feb 2018 19:09:02 +0000 (11:09 -0800)
commite454ad4becff73588b1b3cc24dba3a0e740c7f7c
treee15d28dc555858b6227d1b2ca96276ded66cd697
parentf16ef7bd4c37fba8c030b87610f646a1fce5d52d
apply: handle Subversion diffs with /dev/null gracefully

Subversion generates diffs that can contain lines like this one:

--- /dev/null  (nonexistent)

Let's teach Git's apply machinery to handle such a line gracefully.

This fixes https://github.com/git-for-windows/git/isues/1489

Signed-off-by: Tatyana Krasnukha <tatyana@synopsys.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c
t/t4135-apply-weird-filenames.sh