[PATCH v3 05/16] Use a blank _notmuch_crypto to choose the default gpg_path
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Feb 10 08:37:52 PST 2016
On Wed 2016-02-10 06:49:54 -0500, David Bremner wrote:
> Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:
>
>> This way we're only choosing a default in one place.
>> ---
>> notmuch-config.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/notmuch-config.c b/notmuch-config.c
>> index d252bb2..7cd19a7 100644
>> --- a/notmuch-config.c
>> +++ b/notmuch-config.c
>> @@ -418,7 +418,8 @@ notmuch_config_open (void *ctx,
>> }
>>
>> if (notmuch_config_get_crypto_gpg_path (config) == NULL) {
>> - notmuch_config_set_crypto_gpg_path (config, "gpg");
>> + _notmuch_crypto_t crypto = { .gpg_path = NULL };
>> + notmuch_config_set_crypto_gpg_path (config, _notmuch_crypto_get_gpg_path (&crypto));
>> }
>
> I'm not sure if it's worth it, but this particular usage would be
> cleaner if _notmuch_crypto_get_path allowed a NULL argument.
Agreed; this change will be in my v4 series.
--dkg
More information about the notmuch
mailing list