Git development
 help / color / mirror / Atom feed
* [PATCH] gpg-interface: Look up signing keys with only email address
@ 2024-03-05  2:08 Marco Sirabella
  2024-03-05  5:20 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Sirabella @ 2024-03-05  2:08 UTC (permalink / raw)
  To: git; +Cc: Marco Sirabella

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-05  7:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05  2:08 [PATCH] gpg-interface: Look up signing keys with only email address Marco Sirabella
2024-03-05  5:20 ` Junio C Hamano
2024-03-05  7:53   ` Marco Sirabella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox