@@ -48,6 +48,7 @@ fn nonfile_fixture(name: &str, expected_status: &[Expectation<'_>]) -> Outcome {
48
48
false ,
49
49
Default :: default ( ) ,
50
50
false ,
51
+ None ,
51
52
)
52
53
}
53
54
@@ -65,6 +66,7 @@ fn fixture_with_index(
65
66
false ,
66
67
Default :: default ( ) ,
67
68
false ,
69
+ None ,
68
70
)
69
71
}
70
72
@@ -78,6 +80,7 @@ fn submodule_fixture(name: &str, expected_status: &[Expectation<'_>]) -> Outcome
78
80
false ,
79
81
Default :: default ( ) ,
80
82
false ,
83
+ None ,
81
84
)
82
85
}
83
86
@@ -91,6 +94,7 @@ fn conflict_fixture(name: &str, expected_status: &[Expectation<'_>]) -> Outcome
91
94
false ,
92
95
Default :: default ( ) ,
93
96
false ,
97
+ None ,
94
98
)
95
99
}
96
100
@@ -104,6 +108,7 @@ fn submodule_fixture_status(name: &str, expected_status: &[Expectation<'_>], sub
104
108
submodule_dirty,
105
109
Default :: default ( ) ,
106
110
false ,
111
+ None ,
107
112
)
108
113
}
109
114
@@ -117,6 +122,7 @@ fn fixture_filtered(name: &str, pathspecs: &[&str], expected_status: &[Expectati
117
122
false ,
118
123
Default :: default ( ) ,
119
124
false ,
125
+ None ,
120
126
)
121
127
}
122
128
@@ -130,6 +136,7 @@ fn fixture_filtered_detailed(
130
136
submodule_dirty : bool ,
131
137
auto_crlf : gix_filter:: eol:: AutoCrlf ,
132
138
use_odb : bool ,
139
+ fs_capabilities : Option < & dyn Fn ( & std:: path:: Path ) -> gix_fs:: Capabilities > ,
133
140
) -> Outcome {
134
141
// This can easily happen in some fixtures, which can cause flakiness. It's time-dependent after all.
135
142
fn ignore_racyclean ( mut out : Outcome ) -> Outcome {
@@ -179,7 +186,7 @@ fn fixture_filtered_detailed(
179
186
should_interrupt : & AtomicBool :: default ( ) ,
180
187
} ;
181
188
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 ) ) ,
183
190
stat : TEST_OPTIONS ,
184
191
..Options :: default ( )
185
192
} ;
@@ -353,6 +360,7 @@ fn replace_dir_with_file() {
353
360
false ,
354
361
Default :: default ( ) ,
355
362
false ,
363
+ None ,
356
364
) ;
357
365
assert_eq ! (
358
366
out,
@@ -560,6 +568,24 @@ fn unchanged() {
560
568
fixture ( "status_unchanged" , & [ ] ) ;
561
569
}
562
570
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
+
563
589
#[ test]
564
590
fn unchanged_despite_filter ( ) {
565
591
let actual_outcome = fixture_filtered_detailed (
@@ -571,6 +597,7 @@ fn unchanged_despite_filter() {
571
597
false ,
572
598
AutoCrlf :: Enabled ,
573
599
true , /* make ODB available */
600
+ None ,
574
601
) ;
575
602
576
603
let expected_outcome = Outcome {
0 commit comments