]> Sergey Matveev's repositories - public-inbox.git/commit
lei import: support --new-only for IMAP
authorEric Wong <e@80x24.org>
Wed, 9 Jun 2021 22:39:24 +0000 (22:39 +0000)
committerEric Wong <e@80x24.org>
Thu, 10 Jun 2021 09:21:01 +0000 (09:21 +0000)
commit59be5c57763a64c04ecbb9a344b60c435a43fb24
treebe1f978f52bfbafdabeab6fcecc821f2d4035fda
parent84cc78416994832973c44aab08814b43a0fe7e51
lei import: support --new-only for IMAP

Taking ~40s to synchronize a ~75K message IMAP folder is
still a lot of time, so support an option to only touch
new messages.

This is similar to "offlineimap -q" (quick) or "mbsync --new"
switches, but lei already accepts "-q" as a shortcut for
--quiet.  "--new" could work, but "--new-only" might be more
descriptive (or "--only-new"?), since the default fetches
also fetches new messages.

v2: warn for non-IMAP sources, I'm not sure it's worth it for
    Maildir or other sources, yet.  It will also make sense
    for MH and JMAP once we support them.
lib/PublicInbox/LEI.pm
lib/PublicInbox/LeiImport.pm