]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/gpg-trust-level-fix'
authorJunio C Hamano <gitster@pobox.com>
Fri, 28 Apr 2023 23:03:03 +0000 (16:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Apr 2023 23:03:03 +0000 (16:03 -0700)
The "%GT" placeholder for the "--format" option of "git log" and
friends caused BUG() to trigger on a commit signed with an unknown
key, which has been corrected.

* jk/gpg-trust-level-fix:
  gpg-interface: set trust level of missing key to "undefined"

1  2 
gpg-interface.c

diff --cc gpg-interface.c
index aceeb083367bd5c147e809ac8f0f4c2e155622e6,b8ad6821747bea3d98a6255f61da4aa1851cde34..f3ac5acdd9a27a735e356bb596b01db977a3bb28
@@@ -647,10 -632,8 +647,10 @@@ int check_signature(struct signature_ch
        struct gpg_format *fmt;
        int status;
  
 +      gpg_interface_lazy_init();
 +
        sigc->result = 'N';
-       sigc->trust_level = -1;
+       sigc->trust_level = TRUST_UNDEFINED;
  
        fmt = get_format_by_sig(signature);
        if (!fmt)