$pathname =~ s,^/+,,;
if (!$pathname || substr($pathname, -1) eq "/") {
$action ||= "tree";
+ $pathname =~ s,/$,,;
} else {
$action ||= "blob_plain";
}
my $fullname = '';
print "<div class=\"page_path\">";
+ print $cgi->a({-href => href(action=>"tree", hash_base=>$hb),
+ -title => '/'}, '/');
+ print " ";
foreach my $dir (@dirname) {
- $fullname .= $dir . '/';
+ $fullname .= ($fullname ? '/' : '') . $dir;
print $cgi->a({-href => href(action=>"tree", file_name=>$fullname,
hash_base=>$hb),
- -title => $fullname}, esc_html($dir));
- print "/";
+ -title => $fullname}, esc_html($dir . '/'));
+ print " ";
}
if (defined $type && $type eq 'blob') {
print $cgi->a({-href => href(action=>"blob_plain", file_name=>$file_name,
} elsif (defined $type && $type eq 'tree') {
print $cgi->a({-href => href(action=>"tree", file_name=>$file_name,
hash_base=>$hb),
- -title => $name}, esc_html($basename));
- print "/";
+ -title => $name}, esc_html($basename . '/'));
} else {
print esc_html($basename);
}
git_print_header_div('summary', $project);
my ($taglist) = git_get_refs_list("tags");
- if (defined @$taglist) {
+ if (@$taglist) {
git_tags_body($taglist);
}
git_footer_html();
git_print_header_div('summary', $project);
my ($headlist) = git_get_refs_list("heads");
- if (defined @$headlist) {
+ if (@$headlist) {
git_heads_body($headlist, $head);
}
git_footer_html();