]> git.notmuchmail.org Git - notmuch/commit
lib: Support empty header values in database
authorAustin Clements <amdragon@mit.edu>
Mon, 25 Aug 2014 17:26:07 +0000 (13:26 -0400)
committerDavid Bremner <david@tethera.net>
Sat, 30 Aug 2014 18:37:33 +0000 (11:37 -0700)
commit5dbfed4a73d8c310afa51108af1ca6484506145a
tree09ac155dd2520d97950875ec5533b104005e62c4
parent02fec226fcb02a5c784f4322365b979639b37c76
lib: Support empty header values in database

Commit 567bcbc2 introduced support for storing various headers in
document values.  However, doing so in a backwards-compatible way
meant that genuinely empty header values could not be distinguished
from the old behavior of not storing the headers at all, so these
required parsing the original message.

Now that we have database features, new databases can declare that all
messages have header values, so if we have this feature flag, we can
use the stored header value even if it's the empty string.

This requires slight cleanup to notmuch_message_get_header, since the
code previously couldn't distinguish between empty headers and headers
that are never stored in the database (previously this distinction
didn't matter).
lib/message.cc