Skip to content

Commit 7d275cd

Browse files
424evergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 16bd9f2 commit 7d275cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Documentation/config/gpg.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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
33
making or verifying a PGP signature. The program must support the
44
same command-line interface as GPG, namely, to verify a detached
55
signature, "`gpg --verify $signature - <$file`" is run, and the

gpg-interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ static int git_gpg_config(const char *var, const char *value,
783783

784784
if (fmtname) {
785785
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);
787787
}
788788

789789
return 0;

0 commit comments

Comments
 (0)