File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -400,6 +400,11 @@ fn build_matcher_tree(
400400 config. depth_first = true ;
401401 None
402402 }
403+ "-xdev" => {
404+ // TODO add warning if it appears after actual testing criterion
405+ config. same_file_system = true ;
406+ None
407+ }
403408 "-sorted" => {
404409 // TODO add warning if it appears after actual testing criterion
405410 config. sorted_output = true ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ use std::time::SystemTime;
1414use walkdir:: WalkDir ;
1515
1616pub struct Config {
17+ same_file_system : bool ,
1718 depth_first : bool ,
1819 min_depth : usize ,
1920 max_depth : usize ,
@@ -25,6 +26,7 @@ pub struct Config {
2526impl Default for Config {
2627 fn default ( ) -> Config {
2728 Config {
29+ same_file_system : false ,
2830 depth_first : false ,
2931 min_depth : 0 ,
3032 max_depth : usize:: max_value ( ) ,
@@ -115,7 +117,8 @@ fn process_dir<'a>(
115117 let mut walkdir = WalkDir :: new ( dir)
116118 . contents_first ( config. depth_first )
117119 . max_depth ( config. max_depth )
118- . min_depth ( config. min_depth ) ;
120+ . min_depth ( config. min_depth )
121+ . same_file_system ( config. same_file_system ) ;
119122 if config. sorted_output {
120123 walkdir = walkdir. sort_by ( |a, b| a. file_name ( ) . cmp ( b. file_name ( ) ) ) ;
121124 }
@@ -196,6 +199,7 @@ Early alpha implementation. Currently the only expressions supported are
196199 -maxdepth N
197200 -mindepth N
198201 -d[epth]
202+ -xdev
199203 -ctime [+-]N
200204 -atime [+-]N
201205 -mtime [+-]N
You can’t perform that action at this time.
0 commit comments