Update all cc code using .clang-format; please do so as well for future PRs
etc.; emacs has a handy 'clang-format' mode to make this automatic.
For comparing old changes with git blame, we can disregard this one using
--ignore-rev
(see https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame )
Let's use the _current time_ (time(NULL)) instead of the dir-tstamp for a maildir;
this avoids re-indexing mail where the mails have a newer time, but their
directory hasn't (e.g. 'touch')
Experimental, let see how this works.
We got many reports where the 'lazy check' didn't work too well for
people... so make it a bit less lazy, so it'll just work for more
people.
In practice, never skip _directories_ unless they're leaf directories;
this avoids the mtime-does-not-bubble-up problem.
Not only check for duplicate subjects in *siblings*, also recurse into
the children. This remove some clutter from deeply nested threads.
Fixes: #2078.
When marking a message a read, do the same for the duplicates; this
was the old behavior and the intention of the new behavior but didn't
quite work.
Fixes: #2071.
Some #includes were missing for the latter (but only noticeable on some
systems - e.g., build breaks on Cygwin).
So let's replace with something that works equally everywhere.
Fixes: #2060
The scanner had a timeout for scanning, which doesn't work too well with
machine with rel. fast disks / rel. slow machines. Which I don't happen
to have!
Let's remove the timeout, should help with getting unwanted timeouts
which would cut short the indexing.
mu-query.cc:
- make_related_enquire: don't include first query in qvec, we already have all
thread IDs we need to query in thread_ds.
- run_related: always sort first query by date, explained by the comment.
- run_related: include qflags (in particular ascending vs descending) in
leader_qflags.
- run_theaded: don't limit results to maxnum, that results in threads
potentially being cut off.
mu-server.cc:
- output_sexp: don't limit results to maxnum so as to match the behaviour of
mu find (and avoid cuttong off threads).
Fixes#1924 and #1911.
Calculate the thread subject, that is, the subject of the (sub)thread _or_
empty if it's the same as the previous subject.
This is for the UI feature of _not_ showing the subject when it's just
repeating from the previous.
For threading, we still get the _full_ set of messages (since the mset is
limited, but not the enquire); so no need to warn about docids we
haven't seen before.
Also, ensure the unwanted docids are sorted after the wanted ones.
Fixes: #1926.