From e454ad4becff73588b1b3cc24dba3a0e740c7f7c Mon Sep 17 00:00:00 2001 From: Tatyana Krasnukha Date: Thu, 15 Feb 2018 01:29:34 +0100 Subject: 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 Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apply.c') diff --git a/apply.c b/apply.c index 0c7b25989c..3aadbae305 100644 --- a/apply.c +++ b/apply.c @@ -975,7 +975,7 @@ static int gitdiff_verify_name(struct apply_state *state, } free(another); } else { - if (!starts_with(line, "/dev/null\n")) + if (!is_dev_null(line)) return error(_("git apply: bad git-diff - expected /dev/null on line %d"), state->linenr); } -- cgit v1.3-5-g9baa