Supporess suffix ".git" on path breadcrumbs in tree mode.
[gitweb-sgk] / gitweb.cgi
index f7536d2..6ee17d5 100755 (executable)
@@ -4549,8 +4549,10 @@ sub git_print_page_path {
 
 
        print "<div class=\"page_path\">";
 
 
        print "<div class=\"page_path\">";
+       my $pretty_project = $project;
+       $pretty_project =~ s/\/\.git$//;
        print $cgi->a({-href => href(action=>"tree", hash_base=>$hb),
        print $cgi->a({-href => href(action=>"tree", hash_base=>$hb),
-                     -title => 'tree root'}, to_utf8("[$project]"));
+                     -title => 'tree root'}, to_utf8("[$pretty_project]"));
        print " / ";
        if (defined $name) {
                my @dirname = split '/', $name;
        print " / ";
        if (defined $name) {
                my @dirname = split '/', $name;
@@ -5727,9 +5729,11 @@ sub git_project_list_rows {
                        }
                        print "</td>\n";
                }
                        }
                        print "</td>\n";
                }
+               my $pretty_path = $pr->{'path'};
+               $pretty_path =~ s/\/\.git$//;
                print "<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
                                        -class => "list"},
                print "<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
                                        -class => "list"},
-                                      esc_html_match_hl($pr->{'path'}, $search_regexp)) .
+                                      esc_html_match_hl($pretty_path, $search_regexp)) .
                      "</td>\n" .
                      "<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
                                        -class => "list",
                      "</td>\n" .
                      "<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
                                        -class => "list",