<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/message.cc, branch 0.19_rc2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.19_rc2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.19_rc2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2014-10-25T17:26:54Z</updated>
<entry>
<title>lib: Internal support for querying and creating ghost messages</title>
<updated>2014-10-25T17:26:54Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-10-23T12:30:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bc9c50602d20ce712188ea2cc3c5d30647d4d3f5'/>
<id>urn:sha1:bc9c50602d20ce712188ea2cc3c5d30647d4d3f5</id>
<content type='text'>
This updates the message abstraction to support ghost messages: it
adds a message flag that distinguishes regular messages from ghost
messages, and an internal function for initializing a newly created
(blank) message as a ghost message.
</content>
</entry>
<entry>
<title>lib: Introduce macros for bit operations</title>
<updated>2014-10-25T17:26:43Z</updated>
<author>
<name>Austin Clements</name>
<email>aclements@csail.mit.edu</email>
</author>
<published>2014-10-24T12:49:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d99491f27440d83f937131a861ca547bffb8bdf1'/>
<id>urn:sha1:d99491f27440d83f937131a861ca547bffb8bdf1</id>
<content type='text'>
These macros help clarify basic bit-twiddling code and are written to
be robust against C undefined behavior of shift operators.
</content>
</entry>
<entry>
<title>lib: Handle empty date value</title>
<updated>2014-10-11T05:10:12Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-10-06T23:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7487e2e2214b27407e542df164a4d23520bbd8d8'/>
<id>urn:sha1:7487e2e2214b27407e542df164a4d23520bbd8d8</id>
<content type='text'>
In the interest of robustness, avoid undefined behavior of
sortable_unserialise if the date value is missing.  This shouldn't
happen now, but ghost messages will have blank date values.
</content>
</entry>
<entry>
<title>lib: Move message ID compression to _notmuch_message_create_for_message_id</title>
<updated>2014-10-11T05:09:54Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-10-06T23:17:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=54ec8a0fd87ae7a32c8208be67a345c0eeea7f69'/>
<id>urn:sha1:54ec8a0fd87ae7a32c8208be67a345c0eeea7f69</id>
<content type='text'>
Previously, this was performed by notmuch_database_add_message.  This
happens to be the only caller currently (which is why this was safe),
but we're about to introduce more callers, and it makes more sense to
put responsibility for ID compression in the lower-level function
rather than requiring each caller to handle it.
</content>
</entry>
<entry>
<title>lib: actually return failures from notmuch_message_tags_to_maildir_flags</title>
<updated>2014-09-24T18:19:34Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-09-22T09:54:52Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f42e2e43a0284491c02a55e45c2cf4233b2b94f1'/>
<id>urn:sha1:f42e2e43a0284491c02a55e45c2cf4233b2b94f1</id>
<content type='text'>
The function takes great care to preserve the first error status it
encounters, yet fails to return that status to the caller. Fix it.
</content>
</entry>
<entry>
<title>lib: Return an error from operations that require an upgrade</title>
<updated>2014-08-30T18:39:41Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-08-25T17:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ec573cd54fb3ea98f37a3c3612b00fb16e34578b'/>
<id>urn:sha1:ec573cd54fb3ea98f37a3c3612b00fb16e34578b</id>
<content type='text'>
Previously, there was no protection against a caller invoking an
operation on an old database version that would effectively corrupt
the database by treating it like a newer version.

According to notmuch.h, any caller that opens the database in
read/write mode is supposed to check if the database needs upgrading
and perform an upgrade if it does.  This would protect against this,
but nobody (even the CLI) actually does this.

However, with features, it's easy to protect against incompatible
operations on a fine-grained basis.  This lightweight change allows
callers to safely operate on old database versions, while preventing
specific operations that would corrupt the database with an
informative error message.
</content>
</entry>
<entry>
<title>lib: Support empty header values in database</title>
<updated>2014-08-30T18:37:33Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-08-25T17:26:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5dbfed4a73d8c310afa51108af1ca6484506145a'/>
<id>urn:sha1:5dbfed4a73d8c310afa51108af1ca6484506145a</id>
<content type='text'>
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).
</content>
</entry>
<entry>
<title>lib: Improve documentation of _notmuch_message_create_for_message_id</title>
<updated>2014-08-05T11:14:15Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2014-08-05T01:29:16Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0c1292051eef2a6f6a9a07630eadffe53186489e'/>
<id>urn:sha1:0c1292051eef2a6f6a9a07630eadffe53186489e</id>
<content type='text'>
Clarify the state of the returned message when
_notmuch_message_create_for_message_id returns
NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND.
</content>
</entry>
<entry>
<title>lib: Invalidate message metadata in _notmuch_message_gen_terms</title>
<updated>2014-08-04T21:57:55Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2014-08-01T02:59:27Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=30de720ba09fdf67fbe45642da67b62dcc6ecdf7'/>
<id>urn:sha1:30de720ba09fdf67fbe45642da67b62dcc6ecdf7</id>
<content type='text'>
Previously, we invalidated stored message metadata in
_notmuch_message_add_term and _notmuch_message_remove_term, but not in
_notmuch_message_gen_terms.  This doesn't currently result in any bugs
because of our limited uses of _notmuch_message_gen_terms, but it may
could cause trouble in the future.
</content>
</entry>
<entry>
<title>lib: Start all function names in notmuch-private.h with</title>
<updated>2014-07-13T15:25:29Z</updated>
<author>
<name>Charles Celerier</name>
<email>cceleri@cs.stanford.edu</email>
</author>
<published>2014-05-13T09:44:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=df8885f62c13f77b2b16cbb211e3a727945870b0'/>
<id>urn:sha1:df8885f62c13f77b2b16cbb211e3a727945870b0</id>
<content type='text'>
As noted in devel/STYLE, every private library function should start
with _notmuch. This patch corrects function naming that did not adhere
to this style in lib/notmuch-private.h. In particular, the old function
names that now begin with _notmuch are

    notmuch_sha1_of_file
    notmuch_sha1_of_string
    notmuch_message_file_close
    notmuch_message_file_get_header
    notmuch_message_file_open
    notmuch_message_get_author
    notmuch_message_set_author

Signed-off-by: Charles Celerier &lt;cceleri@cs.stanford.edu&gt;
</content>
</entry>
</feed>
