# HG changeset patch # User Georges Racinet # Date 1710159798 -3600 # Node ID 406b413e3cf2964685ee639ce9597b35343e8144 # Parent 68ed56baabf55baf89cf7b5709cddd03d6cb6cc7 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. diff -r 68ed56baabf5 -r 406b413e3cf2 rust/hg-core/src/filepatterns.rs --- 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 { +pub fn glob_to_re(pat: &[u8]) -> Vec { let mut input = pat; let mut res: Vec = vec![]; let mut group_depth = 0;