Mercurial > hg
changeset 51470:406b413e3cf2 stable
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.
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Mon, 11 Mar 2024 13:23:18 +0100 |
parents | 68ed56baabf5 |
children | 5633de951d34 |
files | rust/hg-core/src/filepatterns.rs |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;