[PATCH v4 11/16] add --try-decrypt to notmuch insert

David Bremner david at tethera.net
Sat Aug 13 17:16:54 PDT 2016


Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:

> +    status = notmuch_indexopts_set_try_decrypt (indexopts, try_decrypt);
> +    if (status != NOTMUCH_STATUS_SUCCESS) {
> +	fprintf (stderr, "Error: Failed to set try_decrypt to %s. (%s)\n",
> +		 try_decrypt ? "True" : "False", notmuch_status_to_string (status));
> +	notmuch_indexopts_destroy (indexopts);
> +	return EXIT_FAILURE;
> +    }

This patch looks fine. I wondered whether it might be useful to add a
"print_status_indexopts" function to status.c to reduce some of the
boilerplate. I think the current way is only a bit longer, so probably
not worth the extra obfuscation, but feel free to add such a function if
you like; it's mainly interesting if there is potential secondary info
from notmuch_database_status_string.

d


More information about the notmuch mailing list