summaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-28 21:37:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-28 21:37:55 (GMT)
commit177bd65cf8601216e906ad56ceb6a46f57df22fa (patch)
treeb7eb2ee9a3fe8dced866b236e3031f70ca0d9d55 /apply.c
parent7676b86ec2a60078ed3eb274d208bf61be3e29a7 (diff)
parente454ad4becff73588b1b3cc24dba3a0e740c7f7c (diff)
downloadgit-177bd65cf8601216e906ad56ceb6a46f57df22fa.zip
git-177bd65cf8601216e906ad56ceb6a46f57df22fa.tar.gz
git-177bd65cf8601216e906ad56ceb6a46f57df22fa.tar.bz2
Merge branch 'tk/apply-dev-null-verify-name-fix'
Many places in "git apply" knew that "/dev/null" that signals "there is no such file on this side of the diff" can be followed by whitespace and garbage when parsing a patch, except for one, which made an otherwise valid patch (e.g. ones from subversion) rejected. * tk/apply-dev-null-verify-name-fix: apply: handle Subversion diffs with /dev/null gracefully apply: demonstrate a problem applying svn diffs
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 40a368b..7c88d4e 100644
--- a/apply.c
+++ b/apply.c
@@ -950,7 +950,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);
}