Merge branch 'jn/gitweb-committag'
authorJunio C Hamano <gitster@pobox.com>
Sun, 15 Feb 2009 09:44:11 +0000 (01:44 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 15 Feb 2009 09:44:11 +0000 (01:44 -0800)
* jn/gitweb-committag:
gitweb: Better regexp for SHA-1 committag match

gitweb/gitweb.perl
index 54108742857b1b71060b5d7bd95d4d2fc619d717..8dffa3fd538361c8989ca27ca3842ad6bfc64f6e 100755 (executable)
@@ -1368,7 +1368,7 @@ sub format_log_line_html {
        my $line = shift;
 
        $line = esc_html($line, -nbsp=>1);
-       if ($line =~ m/([0-9a-fA-F]{8,40})/) {
+       if ($line =~ m/\b([0-9a-fA-F]{8,40})\b/) {
                my $hash_text = $1;
                my $link =
                        $cgi->a({-href => href(action=>"object", hash=>$hash_text),