@@ -48,6 +48,7 @@ fn nonfile_fixture(name: &str, expected_status: &[Expectation<'_>]) -> Outcome {
4848 false ,
4949 Default :: default ( ) ,
5050 false ,
51+ None ,
5152 )
5253}
5354
@@ -65,6 +66,7 @@ fn fixture_with_index(
6566 false ,
6667 Default :: default ( ) ,
6768 false ,
69+ None ,
6870 )
6971}
7072
@@ -78,6 +80,7 @@ fn submodule_fixture(name: &str, expected_status: &[Expectation<'_>]) -> Outcome
7880 false ,
7981 Default :: default ( ) ,
8082 false ,
83+ None ,
8184 )
8285}
8386
@@ -91,6 +94,7 @@ fn conflict_fixture(name: &str, expected_status: &[Expectation<'_>]) -> Outcome
9194 false ,
9295 Default :: default ( ) ,
9396 false ,
97+ None ,
9498 )
9599}
96100
@@ -104,6 +108,7 @@ fn submodule_fixture_status(name: &str, expected_status: &[Expectation<'_>], sub
104108 submodule_dirty,
105109 Default :: default ( ) ,
106110 false ,
111+ None ,
107112 )
108113}
109114
@@ -117,6 +122,7 @@ fn fixture_filtered(name: &str, pathspecs: &[&str], expected_status: &[Expectati
117122 false ,
118123 Default :: default ( ) ,
119124 false ,
125+ None ,
120126 )
121127}
122128
@@ -130,6 +136,7 @@ fn fixture_filtered_detailed(
130136 submodule_dirty : bool ,
131137 auto_crlf : gix_filter:: eol:: AutoCrlf ,
132138 use_odb : bool ,
139+ fs_capabilities : Option < & dyn Fn ( & std:: path:: Path ) -> gix_fs:: Capabilities > ,
133140) -> Outcome {
134141 // This can easily happen in some fixtures, which can cause flakiness. It's time-dependent after all.
135142 fn ignore_racyclean ( mut out : Outcome ) -> Outcome {
@@ -179,7 +186,7 @@ fn fixture_filtered_detailed(
179186 should_interrupt : & AtomicBool :: default ( ) ,
180187 } ;
181188 let options = Options {
182- fs : gix_fs:: Capabilities :: probe ( & git_dir) ,
189+ fs : fs_capabilities . map_or_else ( || gix_fs:: Capabilities :: probe ( & git_dir) , |new| new ( & git_dir ) ) ,
183190 stat : TEST_OPTIONS ,
184191 ..Options :: default ( )
185192 } ;
@@ -353,6 +360,7 @@ fn replace_dir_with_file() {
353360 false ,
354361 Default :: default ( ) ,
355362 false ,
363+ None ,
356364 ) ;
357365 assert_eq ! (
358366 out,
@@ -560,6 +568,24 @@ fn unchanged() {
560568 fixture ( "status_unchanged" , & [ ] ) ;
561569}
562570
571+ #[ test]
572+ fn unchanged_symlinks_present_but_deactivated ( ) {
573+ fixture_filtered_detailed (
574+ "status_unchanged" ,
575+ "" ,
576+ & [ ] ,
577+ & [ ] ,
578+ |_| { } ,
579+ false ,
580+ Default :: default ( ) ,
581+ false ,
582+ Some ( & |dir| gix_fs:: Capabilities {
583+ symlink : false ,
584+ ..gix_fs:: Capabilities :: probe ( dir)
585+ } ) ,
586+ ) ;
587+ }
588+
563589#[ test]
564590fn unchanged_despite_filter ( ) {
565591 let actual_outcome = fixture_filtered_detailed (
@@ -571,6 +597,7 @@ fn unchanged_despite_filter() {
571597 false ,
572598 AutoCrlf :: Enabled ,
573599 true , /* make ODB available */
600+ None ,
574601 ) ;
575602
576603 let expected_outcome = Outcome {
0 commit comments