jj/cli
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
..
examples copy-tracking: stub get_copy_records 2024-07-03 20:26:30 -04:00
src str_util: support case‐insensitive string patterns 2024-07-10 05:58:34 +01:00
testing cli: skip formatting instructions if not required 2024-07-09 20:24:14 -05:00
tests cli: skip formatting instructions if not required 2024-07-09 20:24:14 -05:00
build.rs
Cargo.toml windows: avoid UNC paths in run_ui_editor 2024-07-04 11:30:20 +10:00
LICENSE