Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatyana Krasnukha <tatyana@synopsys.com>2018-02-15 03:29:34 +0300
committerJunio C Hamano <gitster@pobox.com>2018-02-15 22:09:02 +0300
commite454ad4becff73588b1b3cc24dba3a0e740c7f7c (patch)
treee15d28dc555858b6227d1b2ca96276ded66cd697 /apply.c
parentf16ef7bd4c37fba8c030b87610f646a1fce5d52d (diff)
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>
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c2
1 files changed, 1 insertions, 1 deletions
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);
}