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