• Jeff King's avatar
    gpg-interface: find the last gpg signature line · 8b44b2be
    Jeff King authored
    A signed tag has a detached signature like this:
      object ...
      [...more header...]
      This is the tag body.
      -----BEGIN PGP SIGNATURE-----
      [opaque gpg data]
      -----END PGP SIGNATURE-----
    Our parser finds the _first_ line that appears to start a
    PGP signature block, meaning we may be confused by a
    signature (or a signature-like line) in the actual body.
    Let's keep parsing and always find the final block, which
    should be the detached signature over all of the preceding
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: Ben Toews's avatarBen Toews <mastahyeti@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
gpg-interface.c 5.81 KB