[PATCH v3 05/16] Use a blank _notmuch_crypto to choose the default gpg_path
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 31 Jan 2016 20:39:50 +0000 (15:39 +1900)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:20:57 +0000 (16:20 -0700)
57/e990e5491f660154bf6f536abd49c2bc24528a [new file with mode: 0644]

diff --git a/57/e990e5491f660154bf6f536abd49c2bc24528a b/57/e990e5491f660154bf6f536abd49c2bc24528a
new file mode 100644 (file)
index 0000000..8f6028f
--- /dev/null
@@ -0,0 +1,70 @@
+Return-Path: <dkg@fifthhorseman.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 9A00B6DE1B17\r
+ for <notmuch@notmuchmail.org>; Sun, 31 Jan 2016 12:40:13 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id uigHvZiJDRaC for <notmuch@notmuchmail.org>;\r
+ Sun, 31 Jan 2016 12:40:12 -0800 (PST)\r
+Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
+ by arlo.cworth.org (Postfix) with ESMTP id E77AD6DE1410\r
+ for <notmuch@notmuchmail.org>; Sun, 31 Jan 2016 12:40:08 -0800 (PST)\r
+Received: from fifthhorseman.net (ip-64-134-185-108.public.wayport.net\r
+ [64.134.185.108])\r
+ by che.mayfirst.org (Postfix) with ESMTPSA id 3A9DDF99A\r
+ for <notmuch@notmuchmail.org>; Sun, 31 Jan 2016 15:40:06 -0500 (EST)\r
+Received: by fifthhorseman.net (Postfix, from userid 1000)\r
+ id 3D17F20553; Sun, 31 Jan 2016 15:40:06 -0500 (EST)\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH v3 05/16] Use a blank _notmuch_crypto to choose the default\r
+ gpg_path\r
+Date: Sun, 31 Jan 2016 15:39:50 -0500\r
+Message-Id: <1454272801-23623-6-git-send-email-dkg@fifthhorseman.net>\r
+X-Mailer: git-send-email 2.7.0.rc3\r
+In-Reply-To: <1454272801-23623-1-git-send-email-dkg@fifthhorseman.net>\r
+References: <1454272801-23623-1-git-send-email-dkg@fifthhorseman.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 31 Jan 2016 20:40:13 -0000\r
+\r
+This way we're only choosing a default in one place.\r
+---\r
+ notmuch-config.c | 3 ++-\r
+ 1 file changed, 2 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/notmuch-config.c b/notmuch-config.c\r
+index d252bb2..7cd19a7 100644\r
+--- a/notmuch-config.c\r
++++ b/notmuch-config.c\r
+@@ -418,7 +418,8 @@ notmuch_config_open (void *ctx,\r
+     }\r
\r
+     if (notmuch_config_get_crypto_gpg_path (config) == NULL) {\r
+-      notmuch_config_set_crypto_gpg_path (config, "gpg");\r
++      _notmuch_crypto_t crypto = { .gpg_path = NULL };\r
++      notmuch_config_set_crypto_gpg_path (config, _notmuch_crypto_get_gpg_path (&crypto));\r
+     }\r
+     \r
+     /* Whenever we know of configuration sections that don't appear in\r
+-- \r
+2.7.0.rc3\r
+\r