From c96d2e515b4bd8a99e417b5bd4cd1428d2a4ebd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Insaurralde?= Date: Mon, 30 Mar 2026 09:24:37 -0300 Subject: [PATCH] commitverify: skip unsigned commits before DB lookup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matías Insaurralde --- appview/commitverify/verify.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appview/commitverify/verify.go b/appview/commitverify/verify.go index bff8efdeb..a83d53f00 100644 --- a/appview/commitverify/verify.go +++ b/appview/commitverify/verify.go @@ -40,6 +40,12 @@ func GetVerifiedCommits(e db.Execer, emailToDid map[string]string, ndCommits []t didPubkeyCache := make(map[string][]models.PublicKey) for _, commit := range ndCommits { + // skip unsigned commits early: no signature means no DB lookup needed, + // and most commits in a typical log are unsigned. + if commit.PGPSignature == "" { + continue + } + committerEmail := commit.Committer.Email if did, exists := emailToDid[committerEmail]; exists { // check if we've already fetched public keys for this did -- 2.51.2