Commit f3b2860423815050777a731c8dd4714235929075

Edward Thomson 2019-12-03T18:57:16

test: ensure treebuilder validate new protection rules Ensure that the new protection around .git::$INDEX_ALLOCATION rules are enabled for using the treebuilder when core.protectNTFS is set.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/tests/object/tree/write.c b/tests/object/tree/write.c
index 9efeeb9..302f2c4 100644
--- a/tests/object/tree/write.c
+++ b/tests/object/tree/write.c
@@ -444,6 +444,7 @@ void test_object_tree_write__protect_filesystems(void)
 
 	cl_git_fail(git_treebuilder_insert(NULL, builder, ".git\xef\xbb\xbf", &bid, GIT_FILEMODE_BLOB));
 	cl_git_fail(git_treebuilder_insert(NULL, builder, ".git\xe2\x80\xad", &bid, GIT_FILEMODE_BLOB));
+	cl_git_fail(git_treebuilder_insert(NULL, builder, ".git::$INDEX_ALLOCATION/dummy-file", &bid, GIT_FILEMODE_BLOB));
 
 	git_treebuilder_free(builder);
 }