<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/open.cc, branch 0.32_rc1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.32_rc1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.32_rc1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2021-04-24T11:07:00Z</updated>
<entry>
<title>compat: rename {,notmuch_}canonicalize_file_name</title>
<updated>2021-04-24T11:07:00Z</updated>
<author>
<name>Đoàn Trần Công Danh</name>
<email>congdanhqx@gmail.com</email>
</author>
<published>2021-04-24T01:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=441a327051f5357175029709030a0ee51131379d'/>
<id>urn:sha1:441a327051f5357175029709030a0ee51131379d</id>
<content type='text'>
When compat canonicalize_file_name was introduced, it was limited to
C code only because it was used by C code only during that time.

&gt;From 5ec6fd4d, (lib/open: check for split configuration when creating
database., 2021-02-16), lib/open.cc, which is C++, relies on the
existent of canonicalize_file_name.

However, we can't blindly enable canonicalize_file_name for C++ code,
because different implementation has different additional signature for
C++ and users can arbitrarily add -DHAVE_CANONICALIZE_FILE_NAME=0 to
{C,CXX}FLAGS.

Let's move our implementation into a util library.

Helped-by: Tomi Ollila &lt;tomi.ollila@iki.fi&gt;
Signed-off-by: Đoàn Trần Công Danh &lt;congdanhqx@gmail.com&gt;
</content>
</entry>
<entry>
<title>lib: provide notmuch_config_path</title>
<updated>2021-03-27T12:26:14Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-02-21T11:34:52Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f5d4349921ded021756d6754d347420e68b23111'/>
<id>urn:sha1:f5d4349921ded021756d6754d347420e68b23111</id>
<content type='text'>
Since the library searches in several locations for a config file, the
caller does not know which of these is chosen in the usual case of
passing NULL as a config file. This changes provides an API for the
caller to retrieve the name of the config file chosen. It will be
tested in a following commit.
</content>
</entry>
<entry>
<title>CLI+lib: detect missing database in split configurations.</title>
<updated>2021-03-27T12:26:14Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-02-23T20:19:13Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=217f8196088f200972d35ee9181bfe361cccc04a'/>
<id>urn:sha1:217f8196088f200972d35ee9181bfe361cccc04a</id>
<content type='text'>
Eventually we want to do all opening of databases in the top
level (main function). This means that detection of missing databases
needs to move out of subcommands. It also requires updating the
library to use the new NO_DATABASE status code.
</content>
</entry>
<entry>
<title>lib/open: canonicalize relative path read from config file</title>
<updated>2021-03-27T12:26:14Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-03-03T12:31:44Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b25e57e6cb65c31030322125aafb0a5eb085b420'/>
<id>urn:sha1:b25e57e6cb65c31030322125aafb0a5eb085b420</id>
<content type='text'>
This matches functionality in the the CLI function
notmuch_config_get_database_path, which was previously used in the CLI
code for all calls to open a database.
</content>
</entry>
<entry>
<title>lib: provide notmuch_database_load_config</title>
<updated>2021-03-27T12:26:14Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-02-09T23:48:38Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2fc40e24de4fb06428273e6f55ebd72faabde778'/>
<id>urn:sha1:2fc40e24de4fb06428273e6f55ebd72faabde778</id>
<content type='text'>
This is mainly targetted at notmuch-config.c, or similar applications
that don't necessarily need both a configuration file and a database
to exist.
</content>
</entry>
<entry>
<title>lib/open: pull _load_key_file out of _choose_database_path</title>
<updated>2021-03-27T12:26:14Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-02-11T00:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a3444e873f27a379600428b1ccf9ef9889553709'/>
<id>urn:sha1:a3444e873f27a379600428b1ccf9ef9889553709</id>
<content type='text'>
Although this increases code duplication, it also increases
flexibility in handling various combinations of missing config file
and missing database.
</content>
</entry>
<entry>
<title>lib/open: fix leaks calling _trial_open</title>
<updated>2021-03-27T12:12:28Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-03-27T12:12:28Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4a8d67e357ff9bfe6ab7612ba052b72b9dcffa3f'/>
<id>urn:sha1:4a8d67e357ff9bfe6ab7612ba052b72b9dcffa3f</id>
<content type='text'>
_trial_open can't know if the PATH_ERROR return value will cause the
error message to be returned from the library, so it's up the caller
to clean up if not.
</content>
</entry>
<entry>
<title>lib/config: add configuration variable for backup directory</title>
<updated>2021-03-20T10:51:36Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-02-17T15:04:54Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a7873df331bcd53dd1bc8da95c4279163437cc13'/>
<id>urn:sha1:a7873df331bcd53dd1bc8da95c4279163437cc13</id>
<content type='text'>
Like the hook directory, we primarily need a way to communicate this
directory between various components, but we may as well let the user
configure it.

Most of the diff is generalizing choose_hook_dir to work for both
backup and hook directories.
</content>
</entry>
<entry>
<title>lib/open: fix hook directory calculation in split configuration</title>
<updated>2021-03-20T10:50:13Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-02-17T11:16:54Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e3a4abc513d314cf7550d43fdcba458421a2daac'/>
<id>urn:sha1:e3a4abc513d314cf7550d43fdcba458421a2daac</id>
<content type='text'>
Choose sibling directory of xapian database, as .notmuch may not
exist.

libgen.h is already used in debugger.c, so it is not a new dependency
/ potential portability problem.
</content>
</entry>
<entry>
<title>lib/compact: enable split config</title>
<updated>2021-03-20T10:50:06Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-02-02T11:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b30a59157d5ba0421c01fa3dc05d238d18738839'/>
<id>urn:sha1:b30a59157d5ba0421c01fa3dc05d238d18738839</id>
<content type='text'>
This promotes _choose_xapian_path from static to extern linkage in
order to share between open.cc and database.cc.
</content>
</entry>
</feed>
