jj/lib
Emily 93d76e5d8f str_util: support case‐insensitive string patterns
Partially resolve a 1.5‐year‐old TODO comment.

Add opt‐in syntax for case‐insensitive matching, suffixing the
pattern kind with `-i`. Not every context supports case‐insensitive
patterns (e.g. Git branch fetch settings). It may make sense to make
this the default in at least some contexts (e.g. the commit signature
and description revsets), but it would require some thought to avoid
more confusing context‐sensitivity.

Make `mine()` match case‐insensitively unconditionally, since email
addresses are conventionally case‐insensitive and it doesn’t take
a pattern anyway.

This currently only handles ASCII case folding, due to the complexities
of case‐insensitive Unicode comparison and the `glob` crate’s lack
of support for it. This is unlikely to matter for email addresses,
which very rarely contain non‐ASCII characters, but is unfortunate
for names and descriptions. However, the current matching behaviour is
already seriously deficient for non‐ASCII text due to the lack of any
normalization, so this hopefully shouldn’t be a blocker to adding the
interface. An expository comment has been left in the code for anyone
who wants to try and address this (perhaps a future version of myself).
2024-07-10 05:58:34 +01:00
..
benches
gen-protos
proc-macros cargo: explicitly indicate paths to publish 2024-04-15 20:37:00 -07:00
src str_util: support case‐insensitive string patterns 2024-07-10 05:58:34 +01:00
tests str_util: support case‐insensitive string patterns 2024-07-10 05:58:34 +01:00
testutils copy-tracking: stub get_copy_records 2024-07-03 20:26:30 -04:00
Cargo.toml copy-tracking: cargo add gix-format and gix diff-blob feature 2024-07-03 20:26:30 -04:00
LICENSE