rust/hg-core/src/matchers.rs
changeset 50856 e037af7de2ce
parent 50695 1c31b343e514
child 50860 f50e71fdfcb4
--- a/rust/hg-core/src/matchers.rs	Mon Aug 21 10:00:08 2023 +0200
+++ b/rust/hg-core/src/matchers.rs	Wed Aug 02 09:57:29 2023 -0400
@@ -479,7 +479,13 @@
                 m1_files.iter().cloned().filter(|f| m2.matches(f)).collect()
             })
         } else {
-            None
+            // without exact input file sets, we can't do an exact
+            // intersection, so we must over-approximate by
+            // unioning instead
+            m1.file_set().map(|m1_files| match m2.file_set() {
+                Some(m2_files) => m1_files.union(m2_files).cloned().collect(),
+                None => m1_files.iter().cloned().collect(),
+            })
         };
         Self { m1, m2, files }
     }