Commit 8d2eef27 by Edward Thomson Committed by Edward Thomson

patch parsing: ensure empty patches are illegal

parent 5d17d726
......@@ -394,3 +394,11 @@ void test_apply_fromfile__binary_change_must_be_reversible(void)
NULL, 0,
PATCH_BINARY_NOT_REVERSIBLE, NULL, 0));
}
void test_apply_fromfile__empty_file_not_allowed(void)
{
git_patch *patch;
cl_git_fail(git_patch_from_patchfile(&patch, "", 0));
cl_git_fail(git_patch_from_patchfile(&patch, NULL, 0));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment