]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gpg-interface: expand gpg.program as a path
authorJonas Brandstötter <jonas.brandstoetter@gmx.at>
Fri, 11 Jul 2025 23:23:47 +0000 (01:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Jul 2025 17:07:02 +0000 (10:07 -0700)
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>
Documentation/config/gpg.adoc
gpg-interface.c

index 5cf32b179dc8bd5559be08e040b14a96ce158fd7..240e46c050545c1d82aa49b4b6e061785cf6e11b 100644 (file)
@@ -1,5 +1,5 @@
 gpg.program::
-       Use this custom program instead of "`gpg`" found on `$PATH` when
+       Pathname of the program to use instead of "`gpg`" when
        making or verifying a PGP signature. The program must support the
        same command-line interface as GPG, namely, to verify a detached
        signature, "`gpg --verify $signature - <$file`" is run, and the
index 0896458de5a9889bf5951d9703c37a67e20d3e1a..3dfbc45385d8477ee3789abaf565cd9a7aa814b9 100644 (file)
@@ -783,7 +783,7 @@ static int git_gpg_config(const char *var, const char *value,
 
        if (fmtname) {
                fmt = get_format_by_name(fmtname);
-               return git_config_string((char **) &fmt->program, var, value);
+               return git_config_pathname((char **) &fmt->program, var, value);
        }
 
        return 0;