gpg-interface: introduce new config to select per gpg format program

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>

Henning Schild committed Jul 17, 2018 at 14:50 UTC b02f51b196deec70867d9616872e533e2633473c
2 files changed +6 -1
Documentation/config.txt
+5
@@ -1832,6 +1832,11 @@ gpg.format::
1832 Specifies which key format to use when signing with `--gpg-sign`.
1833 Default is "openpgp", that is also the only supported value.
1834
1835 +gpg.<format>.program::
1836 + Use this to customize the program used for the signing format you
1837 + chose. (see `gpg.program` and `gpg.format`) `gpg.program` can still
1838 + be used as a legacy synonym for `gpg.openpgp.program`.
1839 +
1840 gui.commitMsgWidth::
1841 Defines how wide the commit message window is in the
1842 linkgit:git-gui[1]. "75" is the default.
gpg-interface.c
+1 -1
@@ -189,7 +189,7 @@ int git_gpg_config(const char *var, const char *value, void *cb)
189 return 0;
190 }
191
192 - if (!strcmp(var, "gpg.program"))
192 + if (!strcmp(var, "gpg.program") || !strcmp(var, "gpg.openpgp.program"))
193 fmtname = "openpgp";
194
195 if (fmtname) {