File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -780,6 +780,26 @@ void test_index_tests__protectntfs_on_by_default(void)
780780 cl_fixture_cleanup ("invalid" );
781781}
782782
783+ void test_index_tests__can_disable_protectntfs (void )
784+ {
785+ git_repository * repo ;
786+ git_index * index ;
787+
788+ cl_must_pass (p_mkdir ("valid" , 0700 ));
789+ cl_git_rewritefile ("valid/git~1" , "steal the shortname" );
790+
791+ cl_git_pass (git_repository_init (& repo , "./valid" , 0 ));
792+ cl_git_pass (git_repository_index (& index , repo ));
793+ cl_repo_set_bool (repo , "core.protectNTFS" , false);
794+
795+ cl_git_pass (git_index_add_bypath (index , "git~1" ));
796+
797+ git_index_free (index );
798+ git_repository_free (repo );
799+
800+ cl_fixture_cleanup ("valid" );
801+ }
802+
783803void test_index_tests__remove_entry (void )
784804{
785805 git_repository * repo ;
You can’t perform that action at this time.
0 commit comments