From: Daniel Kahn Gillmor Date: Wed, 20 Jan 2016 02:52:38 +0000 (+1900) Subject: [PATCH v2 05/16] Use a blank _notmuch_crypto to choose the default gpg_path X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cee60fe4fe34c4bcd23dc0ca7b64bd1d339467fc;p=notmuch-archives.git [PATCH v2 05/16] Use a blank _notmuch_crypto to choose the default gpg_path --- diff --git a/49/9b59ca72818188cd52e83d521dd114e1cfe428 b/49/9b59ca72818188cd52e83d521dd114e1cfe428 new file mode 100644 index 000000000..f182706a4 --- /dev/null +++ b/49/9b59ca72818188cd52e83d521dd114e1cfe428 @@ -0,0 +1,69 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id D1D786DE1601 + for ; Tue, 19 Jan 2016 18:53:29 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.023 +X-Spam-Level: +X-Spam-Status: No, score=-0.023 tagged_above=-999 required=5 + tests=[AWL=-0.023] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id o8HbBTfU5oTB for ; + Tue, 19 Jan 2016 18:53:28 -0800 (PST) +Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108]) + by arlo.cworth.org (Postfix) with ESMTP id 940A16DE173B + for ; Tue, 19 Jan 2016 18:53:16 -0800 (PST) +Received: from fifthhorseman.net (unknown [38.109.115.130]) + by che.mayfirst.org (Postfix) with ESMTPSA id B2940F98B + for ; Tue, 19 Jan 2016 21:53:12 -0500 (EST) +Received: by fifthhorseman.net (Postfix, from userid 1000) + id DC72E2036B; Tue, 19 Jan 2016 18:53:10 -0800 (PST) +From: Daniel Kahn Gillmor +To: Notmuch Mail +Subject: [PATCH v2 05/16] Use a blank _notmuch_crypto to choose the default + gpg_path +Date: Tue, 19 Jan 2016 21:52:38 -0500 +Message-Id: <1453258369-7366-6-git-send-email-dkg@fifthhorseman.net> +X-Mailer: git-send-email 2.7.0.rc3 +In-Reply-To: <1453258369-7366-1-git-send-email-dkg@fifthhorseman.net> +References: <1453258369-7366-1-git-send-email-dkg@fifthhorseman.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 20 Jan 2016 02:53:30 -0000 + +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)); + } + + /* Whenever we know of configuration sections that don't appear in +-- +2.7.0.rc3 +