<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/open.cc, branch master</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=master</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2025-11-09T12:05:30Z</updated>
<entry>
<title>open: avoid leaking index_as_text regex objects</title>
<updated>2025-11-09T12:05:30Z</updated>
<author>
<name>Anton Khirnov</name>
<email>anton@khirnov.net</email>
</author>
<published>2025-10-17T07:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5c921b6c0b2df460c7d50f6563edf700d0420732'/>
<id>urn:sha1:5c921b6c0b2df460c7d50f6563edf700d0420732</id>
<content type='text'>
Regexes compiled with regcomp() need to be freed with regfree(). Do that
in a talloc destructor attached to the compiled regex array.

Amended by db: Use C style comment. Add blank line per uncrustify.
</content>
</entry>
<entry>
<title>lib: clear error message on success in _choose_database_path</title>
<updated>2023-12-06T11:33:05Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2023-12-03T18:56:44Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b97cd90040a8353e6f94c317af2020f3d6e67a2e'/>
<id>urn:sha1:b97cd90040a8353e6f94c317af2020f3d6e67a2e</id>
<content type='text'>
Previously we both found a database and returned a message saying that
the database could not be found (along with a success code). This
change should prevent spurious error output.
</content>
</entry>
<entry>
<title>Pass error message from GLib ini parser to CLI</title>
<updated>2023-09-23T11:34:48Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2023-09-15T12:50:04Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1c10d91d8e4a3e5bc76ca4c6b9939f3759e6ef5e'/>
<id>urn:sha1:1c10d91d8e4a3e5bc76ca4c6b9939f3759e6ef5e</id>
<content type='text'>
The function _notmuch_config_load_from_file is only called in two
places in open.cc. Update internal API to match the idiom in open.cc.
Adding a newline is needed for consistency with other status strings.

Based in part on a patch [1] from Eric Blake.

[1]: id:20230906153402.101471-1-eblake@redhat.com
</content>
</entry>
<entry>
<title>lib: parse index.as_text</title>
<updated>2023-04-02T22:22:36Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2023-01-06T00:02:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3f5809bf28becbddfed9ff33d6f1242346904c23'/>
<id>urn:sha1:3f5809bf28becbddfed9ff33d6f1242346904c23</id>
<content type='text'>
We pre-parse into a list of compiled regular expressions to avoid
calling regexc on the hot (indexing) path.  As explained in the code
comment, this cannot be done lazily with reasonable error reporting,
at least not without touching a lot of the code in index.cc.
</content>
</entry>
<entry>
<title>lib: add field processor for lastmod: prefix</title>
<updated>2022-09-03T11:43:33Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-08-14T15:02:59Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2e5ef69fbf9ce9d67720d5d4abba3026302734e5'/>
<id>urn:sha1:2e5ef69fbf9ce9d67720d5d4abba3026302734e5</id>
<content type='text'>
By sharing the existing logic used by the sexp query parser, this
allows negative lastmod revisions to be interpreted as relative to the
most recent revision.
</content>
</entry>
<entry>
<title>lib/open: create database path in some cases</title>
<updated>2022-09-03T11:24:43Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-07-29T11:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=84e4e130e2c920b3dee91901582c4ab6276e2630'/>
<id>urn:sha1:84e4e130e2c920b3dee91901582c4ab6276e2630</id>
<content type='text'>
There is some duplication of code here, but not all of the locations
valid to find a database make sense to create. Furthermore we nead two
passes, so the control flow in _choose_database_path would get a bit
convoluted.
</content>
</entry>
<entry>
<title>lib/open: return non-SUCCESS on missing database path</title>
<updated>2022-09-03T11:24:43Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-07-29T11:23:11Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8ba3057d01b11fb806581f8dc451a8891a4d4e0e'/>
<id>urn:sha1:8ba3057d01b11fb806581f8dc451a8891a4d4e0e</id>
<content type='text'>
This simplifies the logic of creating the directory path when it doesn't
exist.
</content>
</entry>
<entry>
<title>lib/open: refactor call to mkdir into function</title>
<updated>2022-09-03T11:24:43Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2022-07-28T10:41:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=25e2790e303b6d9334676e3165a92c6084aa3567'/>
<id>urn:sha1:25e2790e303b6d9334676e3165a92c6084aa3567</id>
<content type='text'>
This makes the error handling available for re-use. Using
g_mkdir_with_parents also handles the case of a pre-existing
directory. This introduces new functionality, namely creating the
parent directories, which will be useful for creating directories like
'.local/share/notmuch/default'.
</content>
</entry>
<entry>
<title>lib/open: use notmuch-&gt;params to track split status</title>
<updated>2022-01-15T19:53:31Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-12-25T13:33:03Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=63b4c469835133ac44b7db516fc54b8a4abb90a8'/>
<id>urn:sha1:63b4c469835133ac44b7db516fc54b8a4abb90a8</id>
<content type='text'>
Persisting this status will allow us to use the information in other
compilation units, in particular when setting configuration defaults.
</content>
</entry>
<entry>
<title>lib/open: use db struct as talloc ctx for choose_database_path</title>
<updated>2022-01-15T19:51:33Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-12-25T13:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fd0edeb561e5593d8a834fcc74602b2d8c637123'/>
<id>urn:sha1:fd0edeb561e5593d8a834fcc74602b2d8c637123</id>
<content type='text'>
The extra talloc struct "local" was left over from before the notmuch
struct was allocated earlier. Having the notmuch struct available in
this function will allow more flexibility to track the configuration
variations (e.g. split vs. non-split).
</content>
</entry>
</feed>
