\n" .
"
blob:" .
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=blob;h=$hash_parent;hb=$hash_base;f=$file_name")}, $hash_parent) .
@@ -2308,6 +2316,7 @@ sub git_history {
if (!defined $hash_base) {
$hash_base = git_read_head($project);
}
+ my $ftype;
my %co = git_read_commit($hash_base);
if (!%co) {
die_error(undef, "Unknown commit object.");
@@ -2330,17 +2339,9 @@ sub git_history {
$hash = git_get_hash_by_path($hash_base, $file_name);
}
if (defined $hash) {
- my $ftype = git_get_type($hash);
-
- if ($ftype =~ "blob") {
- print "
/" .
- $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=blob_plain;f=$file_name")}, esc_html($file_name)) . "
\n";
- } else {
- print "
/" . esc_html($file_name) . "
\n";
- }
- } else {
- print "
/" . esc_html($file_name) . "
\n";
+ $ftype = git_get_type($hash);
}
+ git_print_page_path($file_name, $ftype);
open my $fd, "-|",
"$GIT rev-list --full-history $hash_base -- \'$file_name\'";