Enhance git change detection by introducing relevant prefixes

- Updated the `git_changed_files_impl` and `collect_untracked_files` functions to accept a set of relevant prefixes, allowing for more targeted change detection.
- Modified the `collect_index_worktree_changes` function to filter changes based on the provided prefixes, improving efficiency in identifying tracked and untracked files.
- Added a new `known_paths` method to the `RojoTree` struct to facilitate the extraction of relevant directory paths.

These changes aim to optimize the detection of changes in the git repository by focusing on specified directory prefixes.
This commit is contained in:
Joe 2026-03-01 16:42:19 -06:00
parent 6ed6d15a69
commit 33022667dc
3 changed files with 70 additions and 16 deletions

View file

@ -39,6 +39,10 @@ impl<K: Hash + Eq, V: Eq> MultiMap<K, V> {
bucket.push(v);
}
pub fn keys(&self) -> hash_map::Keys<'_, K, Vec<V>> {
self.inner.keys()
}
pub fn remove<Q: Borrow<K>, U: Borrow<V>>(&mut self, k: Q, v: U) -> Option<V> {
let b = v.borrow();