Commit a145f2b6 by Carlos Martín Nieto

checkout: add a failing test for refusing a symlinked .gitmodules

We want to reject these as they cause compatibility issues and can lead to git
writing to files outside of the repository.
parent 490cbaa9
......@@ -364,3 +364,10 @@ void test_checkout_nasty__symlink3(void)
test_checkout_passes("refs/heads/symlink3", ".git/foobar");
}
void test_checkout_nasty__gitmodules_symlink(void)
{
cl_repo_set_bool(repo, "core.protectHFS", true);
cl_repo_set_bool(repo, "core.protectNTFS", true);
test_checkout_passes("refs/heads/gitmodules-symlink", ".gitmodules");
}
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