Added code to recognize signatures (untested)
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Mon, 10 Oct 2016 19:31:03 +0000 (21:31 +0200)
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Mon, 10 Oct 2016 19:31:03 +0000 (21:31 +0200)
gitweb.cgi

index b8de05c..91cedcf 100755 (executable)
@@ -3445,7 +3445,10 @@ sub parse_commit_text {
 
        my $header = shift @commit_lines;
        if ($header !~ m/^[0-9a-fA-F]{40}/) {
-               return;
+         return;
+       }
+       if ($committext =~ m/(-----BEGIN PGP SIGNATURE-----.*-----END PGP SIGNATURE-----)/m ) {
+         $co{'sig'} = $1;
        }
        ($co{'id'}, my @parents) = split ' ', $header;
        while (my $line = shift @commit_lines) {
@@ -3474,7 +3477,6 @@ sub parse_commit_text {
                        } else {
                                $co{'committer_name'} = $co{'committer'};
                        }
-               }
        }
        if (!defined $co{'tree'}) {
                return;