<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/notmuch-config.c, branch 0.18</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.18</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.18'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2014-04-08T10:27:14Z</updated>
<entry>
<title>compat: add canonicalize_file_name</title>
<updated>2014-04-08T10:27:14Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2014-01-27T14:12:12Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=af5c3afa91cc29268c6754ea70f15cae30f22403'/>
<id>urn:sha1:af5c3afa91cc29268c6754ea70f15cae30f22403</id>
<content type='text'>
the POSIX 2008 behaviour of realpath is not available everywhere so we
provide a simple wrapper function.  We use (and provide) the gnu
extension canonicalize_file_name to make it cleaner to test for the
feature we need; otherwise we have to rely on realpath segfaulting if
the second argument is null.
</content>
</entry>
<entry>
<title>cli: abstract common config get/set code</title>
<updated>2014-01-19T00:09:49Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-01-17T16:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3b36898f0b5cc03d8d93e2892959aacc8953fc2c'/>
<id>urn:sha1:3b36898f0b5cc03d8d93e2892959aacc8953fc2c</id>
<content type='text'>
Pretty straightforward abstraction similar to get/set list.
</content>
</entry>
<entry>
<title>cli: clean up exit status code returned by the cli commands</title>
<updated>2014-01-18T18:45:26Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-01-10T21:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c7453773064efbd0b2cd17b15ba483edbd28ce1e'/>
<id>urn:sha1:c7453773064efbd0b2cd17b15ba483edbd28ce1e</id>
<content type='text'>
Apart from the status codes for format mismatches, the non-zero exit
status codes have been arbitrary. Make the cli consistently return
either EXIT_SUCCESS or EXIT_FAILURE.
</content>
</entry>
<entry>
<title>notmuch-config: use strchr(), not index() (Solaris support)</title>
<updated>2013-08-24T09:37:51Z</updated>
<author>
<name>Blake Jones</name>
<email>blakej@foo.net</email>
</author>
<published>2012-11-14T02:10:03Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d416294ae87ee08a723616abe7bf0fa78cc35dbf'/>
<id>urn:sha1:d416294ae87ee08a723616abe7bf0fa78cc35dbf</id>
<content type='text'>
notmuch-config.c has the only use of the function named "index()" in the
notmuch source.  Several other places use the equivalent function
"strchr()"; this patch just fixes notmuch-config.c to use strchr()
instead.  (Solaris needs to include &lt;strings.h&gt; to get the prototype for
index(), and notmuch-config.c was failing to include that header, so it
wasn't compiling as-is.)
</content>
</entry>
<entry>
<title>cli: config: fix config file save when the file does not exist</title>
<updated>2013-05-12T10:46:44Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2013-05-05T19:18:20Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9641fe1ce70d804ab4a9f63671e3905944dba7e5'/>
<id>urn:sha1:9641fe1ce70d804ab4a9f63671e3905944dba7e5</id>
<content type='text'>
The use of realpath(3) in
commit 58ed67992d0ec1fa505026105218fa449f7980b0
Author: Jani Nikula &lt;jani@nikula.org&gt;
Date:   Sun Apr 7 20:15:03 2013 +0300

    cli: config: do not overwrite symlinks when saving config file

broke config file save when the file does not exist, which results in
'notmuch setup' always failing to create a new config file.

Fix by checking ENOENT from realpath(3).
</content>
</entry>
<entry>
<title>cli: config: do not overwrite symlinks when saving config file</title>
<updated>2013-04-14T21:38:07Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2013-04-07T17:15:03Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=58ed67992d0ec1fa505026105218fa449f7980b0'/>
<id>urn:sha1:58ed67992d0ec1fa505026105218fa449f7980b0</id>
<content type='text'>
Use realpath to canonicalize the config path before writing.

Previously 'notmuch setup' and 'notmuch config set' overwrote the
config file even if it was a symbolic link.
</content>
</entry>
<entry>
<title>cli: config: remove unnecessary braces from if blocks</title>
<updated>2013-03-30T22:30:06Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2013-03-30T14:21:20Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bf3436669343b935a119fd37c4469c8948610121'/>
<id>urn:sha1:bf3436669343b935a119fd37c4469c8948610121</id>
<content type='text'>
Cosmetic change to drop unnecessary braces that don't even conform to
the prevailing coding style.
</content>
</entry>
<entry>
<title>cli: move config open/close to main() from subcommands</title>
<updated>2013-03-08T11:54:41Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2013-03-03T21:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4ef2106792439f5ade157b3ba3b8f7fa86fcb3ed'/>
<id>urn:sha1:4ef2106792439f5ade157b3ba3b8f7fa86fcb3ed</id>
<content type='text'>
This allows specifying config file as a top level argument to notmuch,
and generally makes it possible to override config file options in
main(), without having to touch the subcommands.

If the config file does not exist, one will be created for the notmuch
main command and setup and help subcommands. Help is special in this
regard; the config is created just to avoid errors about missing
config, but it will not be saved.

This also makes notmuch config the talloc context for subcommands.
</content>
</entry>
<entry>
<title>cli: config: make notmuch_config_open() "is new" parameter input only</title>
<updated>2013-03-07T13:39:12Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2013-03-03T21:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e76f6517de020783d828be59f461f1d4f465c4b4'/>
<id>urn:sha1:e76f6517de020783d828be59f461f1d4f465c4b4</id>
<content type='text'>
We now have a notmuch_config_is_new() function to query whether a
config was created or not. Change the notmuch_config_open() is_new
parameter into boolean create_new to determine whether the function
should create a new config if one doesn't exist. This reduces the
complexity of the API.
</content>
</entry>
<entry>
<title>cli: config: keep track of whether the config is newly created</title>
<updated>2013-03-07T13:39:05Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2013-03-03T21:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ca3a4fc02287f65c3587908012d36e68df0200b1'/>
<id>urn:sha1:ca3a4fc02287f65c3587908012d36e68df0200b1</id>
<content type='text'>
Keep track of whether the config is newly created, and add
notmuch_config_is_new() accessor function to query this.

This is to support anyone with a config handle to check this, instead
of just whoever called notmuch_config_open().
</content>
</entry>
</feed>
