Unbreak several notmuch commands after the addition of configuration.
authorCarl Worth <cworth@cworth.org>
Thu, 12 Nov 2009 04:29:30 +0000 (20:29 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 12 Nov 2009 04:29:30 +0000 (20:29 -0800)
commit13569ad6c96c3f3a653ac51274056614647ad7ef
treec65a22c39667f56ae6a6efffe640400f1d634321
parent37bdd8987094220c84ec39f8f550753219f68bd4
Unbreak several notmuch commands after the addition of configuration.

All of the following commands:

notmuch dump
notmuch reply
notmuch restore
notmuch search
notmuch show
notmuch tag

were calling notmuch_database_open with an argument of NULL. This was
a legitimate call until the recent addition of configuration, after
which it is expected that all commands will lookup the correct path in
the configuration file. So fix all these commands to do that.

Also, while touching all of these commands, we fix them to use the
talloc context that is passed in rather than creating a local talloc
context. We also switch from using goto for return values, to doing
direct returns as soon as an error is detected, (which can be leak
free thanks to talloc).
notmuch-dump.c
notmuch-reply.c
notmuch-restore.c
notmuch-search.c
notmuch-show.c
notmuch-tag.c