Merge branch 'mm/maint-gitweb-project-maxdepth'
authorJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2012 23:58:30 +0000 (15:58 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2012 23:58:30 +0000 (15:58 -0800)
* mm/maint-gitweb-project-maxdepth:
gitweb: accept trailing "/" in $project_list

gitweb/gitweb.perl
index fc41b07bcb4a7493d255150b3a3fa75ca7412352..285fe88403a9d65aafd9a9cf7628a4dde0aa9829 100755 (executable)
@@ -2836,8 +2836,8 @@ sub git_get_projects_list {
                my $dir = $projects_list;
                # remove the trailing "/"
                $dir =~ s!/+$!!;
-               my $pfxlen = length("$projects_list");
-               my $pfxdepth = ($projects_list =~ tr!/!!);
+               my $pfxlen = length("$dir");
+               my $pfxdepth = ($dir =~ tr!/!!);
                # when filtering, search only given subdirectory
                if ($filter) {
                        $dir .= "/$filter";