Commit 0d8b9373 by Edward Thomson Committed by Patrick Steinhardt

tree: ensure we protect NTFS paths everywhere

parent 50a33c30
...@@ -141,7 +141,7 @@ void test_object_tree_write__sorted_subtrees(void) ...@@ -141,7 +141,7 @@ void test_object_tree_write__sorted_subtrees(void)
cl_git_pass(git_treebuilder_new(&builder, g_repo, NULL)); cl_git_pass(git_treebuilder_new(&builder, g_repo, NULL));
for (i = 0; i < ARRAY_SIZE(entries); ++i) { for (i = 0; i < ARRAY_SIZE(entries); ++i) {
git_oid *id = entries[i].attr == GIT_FILEMODE_TREE ? &tid : &bid; git_oid *id = entries[i].attr == GIT_FILEMODE_TREE ? &tid : &bid;
cl_git_pass(git_treebuilder_insert(NULL, cl_git_pass(git_treebuilder_insert(NULL,
builder, entries[i].filename, id, entries[i].attr)); builder, entries[i].filename, id, entries[i].attr));
...@@ -418,10 +418,8 @@ void test_object_tree_write__protect_filesystems(void) ...@@ -418,10 +418,8 @@ void test_object_tree_write__protect_filesystems(void)
*/ */
cl_git_pass(git_treebuilder_new(&builder, g_repo, NULL)); cl_git_pass(git_treebuilder_new(&builder, g_repo, NULL));
#ifndef GIT_WIN32 cl_git_fail(git_treebuilder_insert(NULL, builder, ".git.", &bid, GIT_FILEMODE_BLOB));
cl_git_pass(git_treebuilder_insert(NULL, builder, ".git.", &bid, GIT_FILEMODE_BLOB)); cl_git_fail(git_treebuilder_insert(NULL, builder, "git~1", &bid, GIT_FILEMODE_BLOB));
cl_git_pass(git_treebuilder_insert(NULL, builder, "git~1", &bid, GIT_FILEMODE_BLOB));
#endif
#ifndef __APPLE__ #ifndef __APPLE__
cl_git_pass(git_treebuilder_insert(NULL, builder, ".git\xef\xbb\xbf", &bid, GIT_FILEMODE_BLOB)); cl_git_pass(git_treebuilder_insert(NULL, builder, ".git\xef\xbb\xbf", &bid, GIT_FILEMODE_BLOB));
......
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