From: Marco Sirabella <marco@sirabella.org>
To: git@vger.kernel.org
Cc: Marco Sirabella <marco@sirabella.org>
Subject: [PATCH] gpg-interface: Look up signing keys with only email address
Date: Mon, 4 Mar 2024 18:08:15 -0800 [thread overview]
Message-ID: <20240305020815.2980-1-marco@sirabella.org> (raw)
Sometimes gpg signing key UIDs include a comment between the name and
parenthesis in the form of:
John Smith (example) jsmith@example.com
There's no way for git to find signing keys associated with just these
UIDs, so look up a partial match on the email only.
Signed-off-by: Marco Sirabella <marco@sirabella.org>
---
gpg-interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gpg-interface.c b/gpg-interface.c
index 95e764acb1..3c303e05bd 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -922,7 +922,7 @@ const char *get_signing_key(void)
return use_format->get_default_key();
}
- return git_committer_info(IDENT_STRICT | IDENT_NO_DATE);
+ return git_committer_info(IDENT_NO_NAME | IDENT_STRICT | IDENT_NO_DATE);
}
const char *gpg_trust_level_to_str(enum signature_trust_level level)
--
2.43.0
next reply other threads:[~2024-03-05 2:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 2:08 Marco Sirabella [this message]
2024-03-05 5:20 ` [PATCH] gpg-interface: Look up signing keys with only email address Junio C Hamano
2024-03-05 7:53 ` Marco Sirabella
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240305020815.2980-1-marco@sirabella.org \
--to=marco@sirabella.org \
--cc=git@vger.kernel.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox