summaryrefslogtreecommitdiff
path: root/tests/checkout/nasty.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/checkout/nasty.c')
-rw-r--r--tests/checkout/nasty.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/checkout/nasty.c b/tests/checkout/nasty.c
index d4d3c8fa4..2a602951b 100644
--- a/tests/checkout/nasty.c
+++ b/tests/checkout/nasty.c
@@ -206,9 +206,8 @@ void test_checkout_nasty__dot_git_dot(void)
*/
void test_checkout_nasty__git_tilde1(void)
{
-#ifdef GIT_WIN32
test_checkout_fails("refs/heads/git_tilde1", ".git/foobar");
-#endif
+ test_checkout_fails("refs/heads/git_tilde1", "git~1/foobar");
}
/* A tree that contains an entry "git~2", when we have forced the short
@@ -274,6 +273,16 @@ void test_checkout_nasty__dot_git_colon_stuff(void)
#endif
}
+/* A tree that contains an entry ".git::$INDEX_ALLOCATION" because NTFS
+ * will interpret that as a synonym to ".git", even when mounted via SMB
+ * on macOS.
+ */
+void test_checkout_nasty__dotgit_alternate_data_stream(void)
+{
+ test_checkout_fails("refs/heads/dotgit_alternate_data_stream", ".git/dummy-file");
+ test_checkout_fails("refs/heads/dotgit_alternate_data_stream", ".git::$INDEX_ALLOCATION/dummy-file");
+}
+
/* Trees that contains entries with a tree ".git" that contain
* byte sequences:
* { 0xe2, 0x80, 0x8c }