Commit 2143a0de by Carlos Martín Nieto Committed by Patrick Steinhardt

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 3adb0dc3
...@@ -364,3 +364,10 @@ void test_checkout_nasty__symlink3(void) ...@@ -364,3 +364,10 @@ void test_checkout_nasty__symlink3(void)
test_checkout_passes("refs/heads/symlink3", ".git/foobar"); 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