]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Mark first match when searching commit messages
[Gitweb] / gitweb.perl
index 1ea603076246c788dde44a914964ca0178a216a88451d26ad536d0d436018b33..00e35dc844a5fcdfed23b6e04192c07cb875997efb1dc6ac42742025781374fc 100755 (executable)
@@ -3838,7 +3838,7 @@ sub git_search_grep_body {
                              chop_and_escape_str($co{'title'}, 50) . "<br/>");
                my $comment = $co{'comment'};
                foreach my $line (@$comment) {
                              chop_and_escape_str($co{'title'}, 50) . "<br/>");
                my $comment = $co{'comment'};
                foreach my $line (@$comment) {
-                       if ($line =~ m/^(.*)($search_regexp)(.*)$/i) {
+                       if ($line =~ m/^(.*?)($search_regexp)(.*)$/i) {
                                my ($lead, $match, $trail) = ($1, $2, $3);
                                $match = chop_str($match, 70, 5, 'center');
                                my $contextlen = int((80 - length($match))/2);
                                my ($lead, $match, $trail) = ($1, $2, $3);
                                $match = chop_str($match, 70, 5, 'center');
                                my $contextlen = int((80 - length($match))/2);
This page took 0.200495 seconds and 4 git commands to generate.