--- a/rust/hg-core/src/matchers.rs Fri Apr 12 14:17:10 2024 +0100
+++ b/rust/hg-core/src/matchers.rs Fri Apr 12 14:21:14 2024 +0100
@@ -395,7 +395,7 @@
/// assert_eq!(matcher.matches(HgPath::new(b"but not this")), false);
/// ///
/// let ignore_patterns =
-/// vec![IgnorePattern::new(PatternSyntax::RootFiles, b"dir/subdir", Path::new(""))];
+/// vec![IgnorePattern::new(PatternSyntax::RootFilesIn, b"dir/subdir", Path::new(""))];
/// let matcher = IncludeMatcher::new(ignore_patterns).unwrap();
/// ///
/// assert!(!matcher.matches(HgPath::new(b"file")));
@@ -866,7 +866,7 @@
});
roots.push(pat.to_owned());
}
- PatternSyntax::RootFiles => {
+ PatternSyntax::RootFilesIn => {
let pat = if pattern == b"." {
&[] as &[u8]
} else {
@@ -963,7 +963,7 @@
// with a regex.
if ignore_patterns
.iter()
- .all(|k| k.syntax == PatternSyntax::RootFiles)
+ .all(|k| k.syntax == PatternSyntax::RootFilesIn)
{
let dirs: HashSet<_> = ignore_patterns
.iter()
@@ -1324,7 +1324,7 @@
// VisitdirRootfilesin
let m = PatternMatcher::new(vec![IgnorePattern::new(
- PatternSyntax::RootFiles,
+ PatternSyntax::RootFilesIn,
b"dir/subdir",
Path::new(""),
)])
@@ -1353,7 +1353,7 @@
// VisitchildrensetRootfilesin
let m = PatternMatcher::new(vec![IgnorePattern::new(
- PatternSyntax::RootFiles,
+ PatternSyntax::RootFilesIn,
b"dir/subdir",
Path::new(""),
)])
@@ -1537,7 +1537,7 @@
// VisitchildrensetRootfilesin
let matcher = IncludeMatcher::new(vec![IgnorePattern::new(
- PatternSyntax::RootFiles,
+ PatternSyntax::RootFilesIn,
b"dir/subdir",
Path::new(""),
)])
@@ -1672,7 +1672,7 @@
)])
.unwrap();
let m2 = IncludeMatcher::new(vec![IgnorePattern::new(
- PatternSyntax::RootFiles,
+ PatternSyntax::RootFilesIn,
b"dir",
Path::new(""),
)])
@@ -1833,7 +1833,7 @@
);
let m2 = Box::new(
IncludeMatcher::new(vec![IgnorePattern::new(
- PatternSyntax::RootFiles,
+ PatternSyntax::RootFilesIn,
b"dir",
Path::new(""),
)])
@@ -2084,7 +2084,7 @@
);
let m2 = Box::new(
IncludeMatcher::new(vec![IgnorePattern::new(
- PatternSyntax::RootFiles,
+ PatternSyntax::RootFilesIn,
b"dir",
Path::new("/repo"),
)])
@@ -2342,7 +2342,7 @@
];
let file_abcdfile = FileMatcher::new(files).unwrap();
let _rootfilesin_dir = PatternMatcher::new(vec![IgnorePattern::new(
- PatternSyntax::RootFiles,
+ PatternSyntax::RootFilesIn,
b"dir",
Path::new(""),
)])