Mercurial > hg
comparison rust/hg-core/src/filepatterns.rs @ 50858:df6dfad5009a
rust-filepatterns: also normalize RelPath
These patterns should be normalized too; this at least does no harm,
and is necessary for proper status support.
author | Spencer Baugh <sbaugh@janestreet.com> |
---|---|
date | Wed, 02 Aug 2023 10:09:23 -0400 |
parents | 796b5d6693a4 |
children | 2b4bcdc948e7 |
comparison
equal
deleted
inserted
replaced
50857:796b5d6693a4 | 50858:df6dfad5009a |
---|---|
315 } = entry; | 315 } = entry; |
316 let pattern = match syntax { | 316 let pattern = match syntax { |
317 PatternSyntax::RootGlob | 317 PatternSyntax::RootGlob |
318 | PatternSyntax::Path | 318 | PatternSyntax::Path |
319 | PatternSyntax::RelGlob | 319 | PatternSyntax::RelGlob |
320 | PatternSyntax::RelPath | |
320 | PatternSyntax::RootFiles => normalize_path_bytes(pattern), | 321 | PatternSyntax::RootFiles => normalize_path_bytes(pattern), |
321 PatternSyntax::Include | PatternSyntax::SubInclude => { | 322 PatternSyntax::Include | PatternSyntax::SubInclude => { |
322 return Err(PatternError::NonRegexPattern(entry.clone())) | 323 return Err(PatternError::NonRegexPattern(entry.clone())) |
323 } | 324 } |
324 _ => pattern.to_owned(), | 325 _ => pattern.to_owned(), |