@@ -2732,7 +2732,7 @@ fn worktree_root_can_be_symlink() -> crate::Result {
27322732#[ test]
27332733fn root_may_not_go_through_dot_git ( ) -> crate :: Result {
27342734 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 ) ] {
27362736 let troot = root. join ( "dir" ) . join ( ".git" ) . join ( dir) ;
27372737 let ( ( out, _root) , entries) = collect ( & root, Some ( & troot) , |keep, ctx| {
27382738 walk ( & root, ctx, options_emit_all ( ) , keep)
@@ -2747,9 +2747,11 @@ fn root_may_not_go_through_dot_git() -> crate::Result {
27472747 ) ;
27482748 assert_eq ! (
27492749 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+ } ] ,
27532755 "{dir}: no traversal happened as root passes though .git"
27542756 ) ;
27552757 }
@@ -3165,7 +3167,7 @@ fn root_can_be_pruned_early_with_pathspec() -> crate::Result {
31653167
31663168 assert_eq ! (
31673169 entries,
3168- [ entry ( "dir" , Pruned , Directory ) ] ,
3170+ [ entry_nomatch ( "dir" , Pruned , Directory ) ] ,
31693171 "the pathspec didn't match the root, early abort"
31703172 ) ;
31713173 Ok ( ( ) )
@@ -3927,7 +3929,7 @@ fn untracked_and_ignored_collapse_mix() {
39273929#[ test]
39283930fn root_cannot_pass_through_case_altered_capital_dot_git_if_case_insensitive ( ) -> crate :: Result {
39293931 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 ) ] {
39313933 let troot = root. join ( "dir" ) . join ( ".GIT" ) . join ( dir) ;
39323934 let ( ( out, _root) , entries) = collect ( & root, Some ( & troot) , |keep, ctx| {
39333935 walk (
@@ -3950,9 +3952,11 @@ fn root_cannot_pass_through_case_altered_capital_dot_git_if_case_insensitive() -
39503952 ) ;
39513953 assert_eq ! (
39523954 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+ } ] ,
39563960 "{dir}: no traversal happened as root passes though .git, it compares in a case-insensitive fashion"
39573961 ) ;
39583962 }
0 commit comments