summaryrefslogtreecommitdiff
path: root/contrib/examples
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-17 08:51:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-05-17 08:51:31 (GMT)
commit5c47f4c6e71e6de08348f837f38a446a2f2b0ed7 (patch)
treec3f388e53beec55d52e14015cbdc3b7771827702 /contrib/examples
parent88f6dbaf99f43053f86474b28beedd91e77c64d9 (diff)
downloadgit-5c47f4c6e71e6de08348f837f38a446a2f2b0ed7.zip
git-5c47f4c6e71e6de08348f837f38a446a2f2b0ed7.tar.gz
git-5c47f4c6e71e6de08348f837f38a446a2f2b0ed7.tar.bz2
builtin-apply: accept patch to an empty file
A patch from a foreign SCM (or plain "diff" output) often have both preimage and postimage filename on ---/+++ lines even for a patch that creates a new file. However, when there is a filename for preimage, we used to insist the file to exist (either in the work tree and/or in the index). When we cannot be sure by parsing the patch that it is not a creation patch, we shouldn't complain when if there is no such a file. This commit fixes the logic. Refactor the code that validates the preimage file into a separate function while we are at it, as it is getting rather big. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/examples')
0 files changed, 0 insertions, 0 deletions