[PATCH] builtin/send-pack: report gpg config errors
- From
Stefan Beller <sbeller@google.com>
- Date
- Jun 12, 2018, 17:53 UTC
- Message-ID
- <20180612175344.65466-1-sbeller@google.com>
- In-Reply-To
- <xmqqk1r3aorh.fsf@gitster-ct.c.googlers.com>
Any caller except of git_gpg_config() except the one in send_pack_config() handles the return value of git_gpg_config(). Also handle the return value there.
Signed-off-by: Stefan Beller <sbeller@google.com> ---
> Makes sense. I wonder if this was deliberate
There was no need for other configuration to be loaded and signing pushes is the first that needs repository configuration.
Looking at 68c757f2199 (push: add a config option push.gpgSign for default signed pushes, 2015-08-19) further, maybe we want to also have this?
Thanks, Stefan
builtin/send-pack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/builtin/send-pack.c b/builtin/send-pack.c index 4923b1058c6..b54a0cae878 100644 --- a/builtin/send-pack.c +++ b/builtin/send-pack.c @@ -101,7 +101,8 @@ static void print_helper_status(struct ref *ref) static int send_pack_config(const char *k, const char *v, void *cb) { - git_gpg_config(k, v, NULL); + if (git_gpg_config(k, v, NULL) < 0) + return -1; if (!strcmp(k, "push.gpgsign")) { const char *value;
-- 2.18.0.rc1.244.gcf134e6275-goog