<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib, branch 0.34.3</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.34.3</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.34.3'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2021-12-29T18:11:21Z</updated>
<entry>
<title>lib/open: do not consider .notmuch alone as an existing database.</title>
<updated>2021-12-29T18:11:21Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-12-25T21:22:56Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=25e0f5e59293ce961549201fdc74f81a3cc1675c'/>
<id>urn:sha1:25e0f5e59293ce961549201fdc74f81a3cc1675c</id>
<content type='text'>
It makes perfect sense for users to want to pre-create .notmuch,
e.g. to install hooks, so we should handle the case of a .notmuch
directory without an actual xapian database more gracefully.
</content>
</entry>
<entry>
<title>lib/config: don't overwrite database.path if the caller passed it</title>
<updated>2021-12-04T00:52:11Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-28T01:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=59aac9cef37a9937bdf2265078d063673111f80b'/>
<id>urn:sha1:59aac9cef37a9937bdf2265078d063673111f80b</id>
<content type='text'>
If the user passed a path, and we opened it, then we consider that
definitive definition of "database.path". This makes libnotmuch
respond more gracefully to certain erroneous combinations of
NOTMUCH_CONFIG settings and config file contents.
</content>
</entry>
<entry>
<title>lib/open: track which parameters are passed</title>
<updated>2021-12-04T00:50:03Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-28T01:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d467444085d96229172ce29ef8654c3c459b6ce2'/>
<id>urn:sha1:d467444085d96229172ce29ef8654c3c459b6ce2</id>
<content type='text'>
This will be used to fine tune the loading of configuration for
certain special configuration items (initially just "database.path").
</content>
</entry>
<entry>
<title>lib/load_config: deallocate / NULL database on fatal error</title>
<updated>2021-10-30T16:51:50Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:38Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fe51c275fcd7107d92b40de511086300ba4060ed'/>
<id>urn:sha1:fe51c275fcd7107d92b40de511086300ba4060ed</id>
<content type='text'>
This fixes a potential memory leak, and makes the behaviour of
notmuch_database_load_config (somewhat) consistent with
n_d_{open,create} with config.
</content>
</entry>
<entry>
<title>lib/load_config: document expectations for db on error, add tests</title>
<updated>2021-10-30T16:49:37Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8f0b84789d4fda0182e073b68b73160c9b94a4b7'/>
<id>urn:sha1:8f0b84789d4fda0182e073b68b73160c9b94a4b7</id>
<content type='text'>
This is a bit different than n_d_{open,create}_with_config, since
there are several non-zero status codes where we do want to return a
non-NULL database structure.
</content>
</entry>
<entry>
<title>lib/create: fix memory leak, ensure *database=NULL on error</title>
<updated>2021-10-30T16:47:47Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2ba50b52302dce08068843e0029f9ee935a0d7f3'/>
<id>urn:sha1:2ba50b52302dce08068843e0029f9ee935a0d7f3</id>
<content type='text'>
This code previously relied on _finish_open to free the notmuch struct
on errors (except for the case of database == NULL, which was a
potential double free). When we removed those frees from _finish_open,
we introduced a (small) memory leak.

In this commit, fix the memory leak, and harmonize the on-error
behaviour with n_d_open_with_config.
</content>
</entry>
<entry>
<title>lib/create: document expectations for db on error, add tests</title>
<updated>2021-10-30T16:45:40Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f3fcdd2ddac2384c0c1daeffa495ad3ec01bc1af'/>
<id>urn:sha1:f3fcdd2ddac2384c0c1daeffa495ad3ec01bc1af</id>
<content type='text'>
It seems sensible to harmonize the behaviour with
n_d_open_with_config. In this commit we just assert the desired
behaviour.
</content>
</entry>
<entry>
<title>lib/open: fix potential double-free, ensure *database=NULL on error</title>
<updated>2021-10-30T16:43:58Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=74c4ce6d88bcc643424c5d89cc8d30cd835e46c3'/>
<id>urn:sha1:74c4ce6d88bcc643424c5d89cc8d30cd835e46c3</id>
<content type='text'>
During refactoring for 0.32, the code that set notmuch=NULL on various
errors was moved into _finish_open. This meant that the the code which
relied on that to set *database to NULL on error was no longer
correct. It also introduced a potential double free, since the notmuch
struct was deallocated inside _finish_open (via n_d_destroy).

In this commit we revert to "allocator frees", and leave any cleanup
to the caller of _finish_open. This allows us to get back the
behaviour of setting *database to NULL with a small change. Other
callers of _finish_open will need free notmuch on errors.
</content>
</entry>
<entry>
<title>lib: document n_o_w_config can return NOTMUCH_STATUS_NO_CONFIG</title>
<updated>2021-10-30T16:41:57Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-21T14:42:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fb02817943e8cd646641d7f1fe914ce8adb3ecb2'/>
<id>urn:sha1:fb02817943e8cd646641d7f1fe914ce8adb3ecb2</id>
<content type='text'>
This should be treated as fatal by callers, since we didn't succeed in
opening a Xapian database.
</content>
</entry>
<entry>
<title>lib: bump lib minor version to 5</title>
<updated>2021-10-15T11:34:39Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-15T11:34:39Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8383b6cb3a06146a2d3cf589090da10b5f78cde0'/>
<id>urn:sha1:8383b6cb3a06146a2d3cf589090da10b5f78cde0</id>
<content type='text'>
One new function (and an enum) was added to the API/ABI.
</content>
</entry>
</feed>
