gpg-interface: introduce new config to select per gpg format program
authorHenning Schild <henning.schild@siemens.com>
Tue, 17 Jul 2018 12:50:11 +0000 (14:50 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Jul 2018 17:02:21 +0000 (10:02 -0700)
Supporting multiple signing formats we will have the need to configure a
custom program each. Add a new config value to cater for that.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
gpg-interface.c
index ac373e3f4806e00efe48b743542f840d16804b40..0e871346a76cb06e32791b92586a3f4c6b4ebaa7 100644 (file)
@@ -1832,6 +1832,11 @@ gpg.format::
        Specifies which key format to use when signing with `--gpg-sign`.
        Default is "openpgp", that is also the only supported value.
 
+gpg.<format>.program::
+       Use this to customize the program used for the signing format you
+       chose. (see `gpg.program` and `gpg.format`) `gpg.program` can still
+       be used as a legacy synonym for `gpg.openpgp.program`.
+
 gui.commitMsgWidth::
        Defines how wide the commit message window is in the
        linkgit:git-gui[1]. "75" is the default.
index 51cad9081d5963c5145e7eb2e91140cb24807e5c..a158f08c13c701eff187861e4fa4693ac6ff3dbd 100644 (file)
@@ -189,7 +189,7 @@ int git_gpg_config(const char *var, const char *value, void *cb)
                return 0;
        }
 
-       if (!strcmp(var, "gpg.program"))
+       if (!strcmp(var, "gpg.program") || !strcmp(var, "gpg.openpgp.program"))
                fmtname = "openpgp";
 
        if (fmtname) {