git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gpg-interface: Look up signing keys with only email address

From
Marco Sirabella <marco@sirabella.org>
Date
Mar 5, 2024, 02:08 UTC
Message-ID
<20240305020815.2980-1-marco@sirabella.org>

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: Junio C Hamano
Message 1 of 3 in “gpg-interface: Look up signing keys with only email address”
  1. gpg-interface: Look up signing keys with only email addressMarco Sirabella, Mar 5, 2024
  2. Junio C HamanoMar 5, 2024
  3. Marco SirabellaMar 5, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.