+ $output .= "<br/>\n";
+ unless ($noprint) {
+ print $output;
+ }
+ return $output;
+}
+
+
+sub git_path_header {
+ my $name = shift;
+ my $type = shift;
+ my $hb = shift;
+ my $noprint = shift;
+ my $title = shift;
+ my $ref = shift;
+ my $hash = shift;
+
+ my $output = "";
+ if (defined $name) {
+ my @dirname = split '/', $name;
+ my $basename = pop @dirname;
+ my $fullname = '';
+
+ foreach my $dir (@dirname) {
+ $fullname .= ($fullname ? '/' : '') . $dir;
+ $output .= $cgi->a({-href => href(action=>"tree", file_name=>$fullname,
+ hash_base=>$hb),
+ -title => $fullname, -class => "title"}, esc_path($dir));
+ $output .= " / ";
+ }
+ if (defined $type && $type eq 'blob') {
+ $output .= $cgi->a({-href => href(action=>"blob_plain", file_name=>$file_name,
+ hash_base=>$hb),
+ -title => $name, -class => "title"}, esc_path($basename));
+ } elsif (defined $type && $type eq 'tree') {
+ $output .= $cgi->a({-href => href(action=>"tree", file_name=>$file_name,
+ hash_base=>$hb),
+ -title => $name, -class => "title"}, esc_path($basename));
+ $output .= " / ";
+ } else {
+ $output .= esc_path($basename);
+ }
+ }
+
+ $output .= "<span class=\"tree_commit_info\">on commit "
+ . $cgi->a({-href => href(action => 'commit', hash => $ref)}, "$title (" . substr($hash, 0, $hash_char) . ")")
+ . "</span>";
+ unless ($noprint) {
+ print $output;
+ }
+ return $output;