diff rust/hg-core/src/matchers.rs @ 49550:363923bd51cd stable

dirstate-v2: hash the source of the ignore patterns as well Fixes the test introduced in the last changeset. This caused the hash to change, which means that the check in the test had to be adapted. Since this hash is only done as a caching mechanism, invalidation does not pose any backwards compatibility issues.
author Rapha?l Gom?s <rgomes@octobus.net>
date Wed, 02 Nov 2022 12:05:34 +0100
parents e8481625c582
children 04f1dba53c96
line wrap: on
line diff
--- a/rust/hg-core/src/matchers.rs	Wed Nov 02 15:24:39 2022 +0100
+++ b/rust/hg-core/src/matchers.rs	Wed Nov 02 12:05:34 2022 +0100
@@ -838,7 +838,7 @@
 pub fn get_ignore_matcher<'a>(
     mut all_pattern_files: Vec<PathBuf>,
     root_dir: &Path,
-    inspect_pattern_bytes: &mut impl FnMut(&[u8]),
+    inspect_pattern_bytes: &mut impl FnMut(&Path, &[u8]),
 ) -> PatternResult<(IncludeMatcher<'a>, Vec<PatternFileWarning>)> {
     let mut all_patterns = vec![];
     let mut all_warnings = vec![];
@@ -871,7 +871,7 @@
 pub fn get_ignore_function<'a>(
     all_pattern_files: Vec<PathBuf>,
     root_dir: &Path,
-    inspect_pattern_bytes: &mut impl FnMut(&[u8]),
+    inspect_pattern_bytes: &mut impl FnMut(&Path, &[u8]),
 ) -> PatternResult<(IgnoreFnType<'a>, Vec<PatternFileWarning>)> {
     let res =
         get_ignore_matcher(all_pattern_files, root_dir, inspect_pattern_bytes);