Skip to content
Snippets Groups Projects
Commit 406b413e3cf2 authored by Georges Racinet's avatar Georges Racinet
Browse files

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.
parent 68ed56baabf5
No related branches found
No related tags found
2 merge requests!812Merge stable into default,!807rust: exporting some regexp utilities
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
} }
/// Transforms a glob pattern into a regex /// 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 input = pat;
let mut res: Vec<u8> = vec![]; let mut res: Vec<u8> = vec![];
let mut group_depth = 0; let mut group_depth = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment