@@ -2732,7 +2732,7 @@ fn worktree_root_can_be_symlink() -> crate::Result {
2732
2732
#[ test]
2733
2733
fn root_may_not_go_through_dot_git ( ) -> crate :: Result {
2734
2734
let root = fixture ( "with-nested-dot-git" ) ;
2735
- for ( dir, expected_pathspec) in [ ( "" , Verbatim ) , ( "subdir" , Always ) ] {
2735
+ for ( dir, expected_pathspec) in [ ( "" , Some ( Verbatim ) ) , ( "subdir" , None ) ] {
2736
2736
let troot = root. join ( "dir" ) . join ( ".git" ) . join ( dir) ;
2737
2737
let ( ( out, _root) , entries) = collect ( & root, Some ( & troot) , |keep, ctx| {
2738
2738
walk ( & root, ctx, options_emit_all ( ) , keep)
@@ -2747,9 +2747,11 @@ fn root_may_not_go_through_dot_git() -> crate::Result {
2747
2747
) ;
2748
2748
assert_eq ! (
2749
2749
entries,
2750
- [ entry( "dir/.git" , Pruned , Directory )
2751
- . with_property( DotGit )
2752
- . with_match( expected_pathspec) ] ,
2750
+ [ {
2751
+ let mut e = entry( "dir/.git" , Pruned , Directory ) . with_property( DotGit ) ;
2752
+ e. 0 . pathspec_match = expected_pathspec;
2753
+ e
2754
+ } ] ,
2753
2755
"{dir}: no traversal happened as root passes though .git"
2754
2756
) ;
2755
2757
}
@@ -3165,7 +3167,7 @@ fn root_can_be_pruned_early_with_pathspec() -> crate::Result {
3165
3167
3166
3168
assert_eq ! (
3167
3169
entries,
3168
- [ entry ( "dir" , Pruned , Directory ) ] ,
3170
+ [ entry_nomatch ( "dir" , Pruned , Directory ) ] ,
3169
3171
"the pathspec didn't match the root, early abort"
3170
3172
) ;
3171
3173
Ok ( ( ) )
@@ -3927,7 +3929,7 @@ fn untracked_and_ignored_collapse_mix() {
3927
3929
#[ test]
3928
3930
fn root_cannot_pass_through_case_altered_capital_dot_git_if_case_insensitive ( ) -> crate :: Result {
3929
3931
let root = fixture ( "with-nested-capitalized-dot-git" ) ;
3930
- for ( dir, expected_pathspec) in [ ( "" , Verbatim ) , ( "subdir" , Always ) ] {
3932
+ for ( dir, expected_pathspec) in [ ( "" , Some ( Verbatim ) ) , ( "subdir" , None ) ] {
3931
3933
let troot = root. join ( "dir" ) . join ( ".GIT" ) . join ( dir) ;
3932
3934
let ( ( out, _root) , entries) = collect ( & root, Some ( & troot) , |keep, ctx| {
3933
3935
walk (
@@ -3950,9 +3952,11 @@ fn root_cannot_pass_through_case_altered_capital_dot_git_if_case_insensitive() -
3950
3952
) ;
3951
3953
assert_eq ! (
3952
3954
entries,
3953
- [ entry( "dir/.GIT" , Pruned , Directory )
3954
- . with_property( DotGit )
3955
- . with_match( expected_pathspec) ] ,
3955
+ [ {
3956
+ let mut e = entry( "dir/.GIT" , Pruned , Directory ) . with_property( DotGit ) ;
3957
+ e. 0 . pathspec_match = expected_pathspec;
3958
+ e
3959
+ } ] ,
3956
3960
"{dir}: no traversal happened as root passes though .git, it compares in a case-insensitive fashion"
3957
3961
) ;
3958
3962
}
0 commit comments