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