* [PATCH 00/10] lei: several bug fixes and refinements
@ 2021-08-31 11:21 7% Eric Wong
2021-08-31 11:21 5% ` [PATCH 03/10] lei_mail_sync: simplify group2folders Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-08-31 11:21 UTC (permalink / raw)
To: meta
Another pile of things found while working on better
synchronization.
Eric Wong (10):
lei_mail_sync: forget_folder: simplify code
lei prune-mail-sync: handle --all (no args)
lei_mail_sync: simplify group2folders
lei_mail_sync: make rename_folder more robust
t/lei-watch: avoid race between glob + readlink
lei note-event: always flush changes on daemon exit
lei: refresh watches before MUA spawn for Maildir
lei_mail_sync: set_src uses binary OIDs
lei: fix error reporting from lei/store -> lei-daemon
lei/store: correctly delete entries from over
lib/PublicInbox/LEI.pm | 4 ++++
lib/PublicInbox/LeiMailSync.pm | 36 ++++++++++++++++++++++------------
lib/PublicInbox/LeiStore.pm | 8 +++++---
lib/PublicInbox/LeiStoreErr.pm | 14 +++++++++++--
t/lei-watch.t | 2 +-
t/lei_mail_sync.t | 15 +++++++-------
6 files changed, 53 insertions(+), 26 deletions(-)
^ permalink raw reply [relevance 7%]
* [PATCH 03/10] lei_mail_sync: simplify group2folders
2021-08-31 11:21 7% [PATCH 00/10] lei: several bug fixes and refinements Eric Wong
@ 2021-08-31 11:21 5% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-08-31 11:21 UTC (permalink / raw)
To: meta
No need to loop when we can rely on grep.
---
lib/PublicInbox/LeiMailSync.pm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/PublicInbox/LeiMailSync.pm b/lib/PublicInbox/LeiMailSync.pm
index bf8fb7de..56468c78 100644
--- a/lib/PublicInbox/LeiMailSync.pm
+++ b/lib/PublicInbox/LeiMailSync.pm
@@ -350,9 +350,7 @@ EOM
} else {
@inc = @all;
}
- for (@inc) {
- push(@$folders, $_) unless $seen{$_}++;
- }
+ push(@$folders, (grep { !$seen{$_}++ } @inc));
}
scalar(@$folders) || $lei->fail(<<EOM);
no --mail-sync folders known to lei
^ permalink raw reply related [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-08-31 11:21 7% [PATCH 00/10] lei: several bug fixes and refinements Eric Wong
2021-08-31 11:21 5% ` [PATCH 03/10] lei_mail_sync: simplify group2folders Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).