From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, masayasuzuki@google.com,
Stefan Beller <sbeller@google.com>
Subject: [PATCH] builtin/send-pack: report gpg config errors
Date: Tue, 12 Jun 2018 10:53:44 -0700 [thread overview]
Message-ID: <20180612175344.65466-1-sbeller@google.com> (raw)
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
next prev parent reply other threads:[~2018-06-12 17:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 17:26 [PATCH] builtin/send-pack: populate the default configs Masaya Suzuki
2018-06-12 17:38 ` Junio C Hamano
2018-06-12 17:53 ` Stefan Beller [this message]
2018-06-12 17:55 ` [PATCH] builtin/send-pack: report gpg config errors Eric Sunshine
2018-06-12 18:07 ` Jonathan Nieder
2018-06-12 18:19 ` Stefan Beller
2018-06-12 18:16 ` [PATCH] builtin/send-pack: populate the default configs Jonathan Nieder
2018-06-12 18:22 ` Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180612175344.65466-1-sbeller@google.com \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=masayasuzuki@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).