Skip to content

Commit

Permalink
fsmonitor: don't apply prefix matching to paths obtained from watchman
Browse files Browse the repository at this point in the history
If I understand it, watchman returns changed files and directories, and a
directory change doesn't mean we need to scan all files under the directory.
  • Loading branch information
yuja committed Nov 19, 2023
1 parent 9352edf commit 37220d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/local_working_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use crate::fsmonitor::FsmonitorKind;
use crate::gitignore::GitIgnoreFile;
use crate::lock::FileLock;
use crate::matchers::{
DifferenceMatcher, EverythingMatcher, IntersectionMatcher, Matcher, PrefixMatcher,
DifferenceMatcher, EverythingMatcher, FilesMatcher, IntersectionMatcher, Matcher, PrefixMatcher,
};
use crate::merge::{Merge, MergeBuilder, MergedTreeValue};
use crate::merged_tree::{MergedTree, MergedTreeBuilder};
Expand Down Expand Up @@ -863,7 +863,7 @@ impl TreeState {
.collect_vec()
});

Some(Box::new(PrefixMatcher::new(&repo_paths)))
Some(Box::new(FilesMatcher::new(&repo_paths)))
}
};
Ok(FsmonitorMatcher {
Expand Down

0 comments on commit 37220d6

Please sign in to comment.