Re: git-receive-pack doesn't seem to respect gpg.program config
On Mon, Oct 26, 2020 at 02:16:25PM -0400, Konstantin Ryabitsev wrote:
Show 7 quoted lines
> While trying to configure signed pushes, I found out that no mater where
> I set gpg.program=/opt/gnupg22/bin/gpg (in-repo config, ~/.gitconfig,
> /etc/gitconfig), git-receive-pack didn't appear to be paying any
> attention to that setting and always used the "gpg" command in the PATH.
>
> Not sure if that's intentional or not, but seems like it should be
> paying attention at least to /etc/gitconfig.
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index bb9909c52e..2a41b24e5a 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -248,6 +248,10 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
return 0;
}
+ status = git_gpg_config(var, value, cb);
+ if (status)
+ return status;
+
return git_default_config(var, value, cb);
}
but didn't test or look further than that.
-Peff