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