<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/notmuch-new.c, branch 0.14</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.14</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.14'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2012-05-25T00:53:38Z</updated>
<entry>
<title>new: Unify add_files and add_files_recursive</title>
<updated>2012-05-25T00:53:38Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-24T22:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4ca36441a84155571ca2e572f3f6a96af55685b1'/>
<id>urn:sha1:4ca36441a84155571ca2e572f3f6a96af55685b1</id>
<content type='text'>
Since starting at the top of a directory tree and recursing within
that tree are now identical operations, there's no need for both
add_files and add_files_recursive.  This eliminates add_files (which
did nothing more than call add_files_recursive after the previous
patch) and renames add_files_recursive to add_files.
</content>
</entry>
<entry>
<title>new: Merge error checks from add_files and add_files_recursive</title>
<updated>2012-05-25T00:53:19Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-24T22:01:12Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=da170ee6573ca8a04f01ebf789250f6b4b4d3cf0'/>
<id>urn:sha1:da170ee6573ca8a04f01ebf789250f6b4b4d3cf0</id>
<content type='text'>
Previously, add_files_recursive could have been called on a symlink to
a non-directory.  Hence, calling it on a non-directory was not an
error, so a separate function, add_files, existed to fail loudly in
situations where the path had to be a directory.

With the new stat-ing logic, add_files_recursive is always called on
directories, so the separation of this logic is no longer necessary.
Hence, this patch moves the strict error checking previously done by
add_files into add_files_recursive.
</content>
</entry>
<entry>
<title>new: Centralize file type stat-ing logic</title>
<updated>2012-05-25T00:53:08Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-24T22:01:11Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d99270c450d8f9ef3ecfbcbeeb99b581f36c9175'/>
<id>urn:sha1:d99270c450d8f9ef3ecfbcbeeb99b581f36c9175</id>
<content type='text'>
This moves our logic to get a file's type into one function.  This has
several benefits: we can support OSes and file systems that do not
provide dirent.d_type or always return DT_UNKNOWN, complex
symlink-handling logic has been replaced by a simple stat fall-through
in one place, and the error message for un-stat-able file is more
accurate (previously, the error always mentioned directories, even
though a broken symlink is not a directory).
</content>
</entry>
<entry>
<title>new: Remove workaround for detecting newly created directory objects</title>
<updated>2012-05-24T01:31:10Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:38Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3f3c446c40e6e7661620645f1c152968b5590f10'/>
<id>urn:sha1:3f3c446c40e6e7661620645f1c152968b5590f10</id>
<content type='text'>
Previously, notmuch_database_get_directory did not indicate whether or
not the returned directory object was newly created, which required a
workaround to distinguish newly created directory objects with no
child messages from directory objects that had no mtime set but did
have child messages.  Now that notmuch_database_get_directory
distinguishes whether or not the directory object exists in the
database, this workaround is no longer necessary.
</content>
</entry>
<entry>
<title>lib/cli: Make notmuch_database_get_directory return a status code</title>
<updated>2012-05-15T11:56:33Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-13T23:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7199d22f4394abdf72ab791fc0aba2c697bf1209'/>
<id>urn:sha1:7199d22f4394abdf72ab791fc0aba2c697bf1209</id>
<content type='text'>
Previously, notmuch_database_get_directory had no way to indicate how
it had failed.  This changes its prototype to return a status code and
set an out-argument to the retrieved directory, like similar functions
in the library API.  This does *not* change its currently broken
behavior of creating directory objects when they don't exist, but it
does document it and paves the way for fixing this.  Also, it can now
check for a read-only database and return
NOTMUCH_STATUS_READ_ONLY_DATABASE instead of crashing.

In the interest of atomicity, this also updates calls from the CLI so
that notmuch still compiles.
</content>
</entry>
<entry>
<title>lib/cli: Make notmuch_database_create return a status code</title>
<updated>2012-05-05T13:12:26Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-04-30T16:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ba5729421825e0ec9d38aa9d656553f329aa6f09'/>
<id>urn:sha1:ba5729421825e0ec9d38aa9d656553f329aa6f09</id>
<content type='text'>
This is the notmuch_database_create equivalent of the previous change.

In this case, there were places where errors were not being propagated
correctly in notmuch_database_create or in calls to it.  These have
been fixed, using the new status value.
</content>
</entry>
<entry>
<title>lib/cli: Make notmuch_database_open return a status code</title>
<updated>2012-05-05T13:11:57Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-04-30T16:25:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5fddc07dc31481453c1af186bf7da241c00cdbf1'/>
<id>urn:sha1:5fddc07dc31481453c1af186bf7da241c00cdbf1</id>
<content type='text'>
It has been a long-standing issue that notmuch_database_open doesn't
return any indication of why it failed.  This patch changes its
prototype to return a notmuch_status_t and set an out-argument to the
database itself, like other functions that return both a status and an
object.

In the interest of atomicity, this also updates every use in the CLI
so that notmuch still compiles.  Since this patch does not update the
bindings, the Python bindings test fails.
</content>
</entry>
<entry>
<title>Use notmuch_database_destroy instead of notmuch_database_close</title>
<updated>2012-04-28T12:27:33Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2012-04-22T12:07:53Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=6f7469f54744656f90ce215f365d5731e16acd3c'/>
<id>urn:sha1:6f7469f54744656f90ce215f365d5731e16acd3c</id>
<content type='text'>
Adapt the notmuch binaries source to the notmuch_database_close split.

Signed-off-by: Justus Winter &lt;4winter@informatik.uni-hamburg.de&gt;
</content>
</entry>
<entry>
<title>new: Fix missing end_atomic in remove_filename on error</title>
<updated>2012-04-25T02:25:52Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-04-22T15:50:52Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2e7b6494046342872f1f79418679b1554d6d1005'/>
<id>urn:sha1:2e7b6494046342872f1f79418679b1554d6d1005</id>
<content type='text'>
Previously, if we failed to find the message by filename in
remove_filename, we would return immediately from the function without
ending its atomic block.  Now this code follows the usual goto DONE
idiom to perform cleanup.
</content>
</entry>
<entry>
<title>new: Print final fatal error message to stderr</title>
<updated>2012-04-25T02:25:52Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-04-22T15:50:51Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=746fef0aeafe1f29720140ab8778cdee22d519cb'/>
<id>urn:sha1:746fef0aeafe1f29720140ab8778cdee22d519cb</id>
<content type='text'>
This was going to stdout.  I removed the newline at the beginning of
printing the fatal error message because it wouldn't make sense if you
were only looking at the stderr stream (e.g., you had redirected
stdout to /dev/null).
</content>
</entry>
</feed>
