about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiLsMailSync.pm
DateCommit message (Collapse)
2023-03-18treewide: move glob2re to PublicInbox::Config
It seems suitable for the config class since globs are a config/option thing.
2022-11-02lei: fix globbing semantics to match end-of-filename
Globs such as `*/foo' should not match `*/foobar'. I noticed this while adding glob support to public-inbox-clone. This may subtly break some existing cases, but there aren't many lei users, yet, and globbing semantics should match what most other glob-using programs, do... We'll also make `lei ls-mail-sync' behave more consistently with `lei ls-external', as far as the basename matching fallback goes.
2021-09-18lei_mail_sync: rely on flock(2), avoid IPC
Since 44917fdd24a8bec1 ("lei_mail_sync: do not use transactions"), relying on lei/store to serialize access was a pointless endeavor. Rely on flock(2) to serialize multiple writers since (in my experience) it's the easiest way to deal with parallel writers when using SQLite. This allows us to simplify existing callers while speeding up 'lei refresh-mail-sync --all=local' by 5% or so.
2021-05-04lei ls-mail-sync: fix handling of non-wildcard filters
If lei_ls_mail_sync() is given a filter without any wildcards and --globoff is unspecified, glob2re() will return undef, resulting in the final regular expression being undefined. Always use a fallback value when there's no RE. Based-on-patch-by: Kyle Meyer <kyle@kyleam.com> Link: https://public-inbox.org/meta/20210504044559.12941-5-kyle@kyleam.com/
2021-05-04lei ls-mail-sync: update reference to ls-sync
ls-sync was renamed to ls-mail-sync in cb0e9d42b799c748. Update a stale reference to the old name.
2021-05-01lei: rename ls-sync to ls-mail-sync
This allows tab-completion for "ls-search" to work with fewer characters ("ls-s<TAB>" instead of "ls-se<TAB>"), and I expect "ls-search" to be used more frequently than "ls-mail-sync". This also matches the --mail-sync switch of "lei import"