rust-filepatterns: export glob_to_re function
Making this function public should not risk freezing the internal API,
and it can be useful for all downstream code that needs to perform
glob matching against byte strings, such as RHGitaly where it will
be useful to match on branches and tags.
--- a/rust/hg-core/src/filepatterns.rs Tue Mar 05 15:07:47 2024 +0100
+++ b/rust/hg-core/src/filepatterns.rs Mon Mar 11 13:23:18 2024 +0100
@@ -73,7 +73,7 @@
}
/// Transforms a glob pattern into a regex
-fn glob_to_re(pat: &[u8]) -> Vec<u8> {
+pub fn glob_to_re(pat: &[u8]) -> Vec<u8> {
let mut input = pat;
let mut res: Vec<u8> = vec![];
let mut group_depth = 0;