gpg-interface: expand gpg.program as a path
This allows using a custom gpg program under the user's home directory by specifying a path starting with '~' [gpg] program = "~/.local/bin/mygpg" Signed-off-by: Jonas Brandstötter <jonas.brandstoetter@gmx.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonas Brandstötter committed
Jul 12, 2025 at 01:23 UTC
7d275cd5c04645de4da789ace92cae6b03d3c93d
2 files changed
+2
-2
Documentation/config/gpg.adoc
+1
-1
@@ -1,5 +1,5 @@
1
gpg.program::
2
- Use this custom program instead of "`gpg`" found on `$PATH` when
2
+ Pathname of the program to use instead of "`gpg`" when
3
making or verifying a PGP signature. The program must support the
4
same command-line interface as GPG, namely, to verify a detached
5
signature, "`gpg --verify $signature - <$file`" is run, and the
gpg-interface.c
+1
-1
@@ -783,7 +783,7 @@ static int git_gpg_config(const char *var, const char *value,
783
784
if (fmtname) {
785
fmt = get_format_by_name(fmtname);
786
- return git_config_string((char **) &fmt->program, var, value);
786
+ return git_config_pathname((char **) &fmt->program, var, value);
787
}
788
789
return 0;