[PATCH v4 05/16] Choose the default gpg_path with _notmuch_crypto_get_gpg_path (NULL)
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 8 Jul 2016 09:27:16 +0000 (11:27 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:11 +0000 (16:22 -0700)
af/7894648bcb50345136af7e3d45c0410173b674 [new file with mode: 0644]

diff --git a/af/7894648bcb50345136af7e3d45c0410173b674 b/af/7894648bcb50345136af7e3d45c0410173b674
new file mode 100644 (file)
index 0000000..ab082b2
--- /dev/null
@@ -0,0 +1,71 @@
+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 7C3B46DE09D3\r
+ for <notmuch@notmuchmail.org>; Fri,  8 Jul 2016 03:13:55 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.054\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.054 tagged_above=-999 required=5 tests=[AWL=0.054]\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 bX7TTGfph43F for <notmuch@notmuchmail.org>;\r
+ Fri,  8 Jul 2016 03:13:47 -0700 (PDT)\r
+Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 602716DE0355\r
+ for <notmuch@notmuchmail.org>; Fri,  8 Jul 2016 03:13:12 -0700 (PDT)\r
+Received: from fifthhorseman.net (unknown [88.128.80.54])\r
+ by che.mayfirst.org (Postfix) with ESMTPSA id 70231F997\r
+ for <notmuch@notmuchmail.org>; Fri,  8 Jul 2016 06:13:11 -0400 (EDT)\r
+Received: by fifthhorseman.net (Postfix, from userid 1000)\r
+ id 970B821132; Fri,  8 Jul 2016 11:27:34 +0200 (CEST)\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH v4 05/16] Choose the default gpg_path with\r
+ _notmuch_crypto_get_gpg_path (NULL)\r
+Date: Fri,  8 Jul 2016 11:27:16 +0200\r
+Message-Id: <1467970047-8013-6-git-send-email-dkg@fifthhorseman.net>\r
+X-Mailer: git-send-email 2.8.1\r
+In-Reply-To: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net>\r
+References: <1467970047-8013-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: Fri, 08 Jul 2016 10:13:55 -0000\r
+\r
+This way we're only choosing a default in one place.\r
+---\r
+ notmuch-config.c | 5 ++---\r
+ 1 file changed, 2 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/notmuch-config.c b/notmuch-config.c\r
+index e5d42a0..9e4601a 100644\r
+--- a/notmuch-config.c\r
++++ b/notmuch-config.c\r
+@@ -417,9 +417,8 @@ notmuch_config_open (void *ctx,\r
+       g_error_free (error);\r
+     }\r
\r
+-    if (notmuch_config_get_crypto_gpg_path (config) == NULL) {\r
+-      notmuch_config_set_crypto_gpg_path (config, "gpg");\r
+-    }\r
++    if (notmuch_config_get_crypto_gpg_path (config) == NULL)\r
++      notmuch_config_set_crypto_gpg_path (config, _notmuch_crypto_get_gpg_path (NULL));\r
+     \r
+     /* Whenever we know of configuration sections that don't appear in\r
+      * the configuration file, we add some comments to help the user\r
+-- \r
+2.8.1\r
+\r