X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/2da942cfb1d329e197699659ea9a6d15c7b8e7e73cbc522fbca4d399a18c1bf2..0792b368cb85d254c192c827440788e79e8c185ad12d977cef5955bd529f7a8b:/gitweb.cgi diff --git a/gitweb.cgi b/gitweb.cgi index fc42778..10f8fda 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -327,7 +327,7 @@ EOF } elsif (defined $hash) { $search_hash = $hash; } else { - $search_hash = "HEAD"; + $search_hash = "HEAD"; } $cgi->param("a", "search"); $cgi->param("h", $search_hash); @@ -1767,8 +1767,8 @@ sub git_opml { } my $path = esc_html(chop_str($proj{'path'}, 25, 5)); - my $rss = "$my_url?p=$proj{'path'};a=rss"; - my $html = "$my_url?p=$proj{'path'};a=summary"; + my $rss = "$my_url?p=$proj{'path'};a=rss"; + my $html = "$my_url?p=$proj{'path'};a=summary"; print "\n"; } print "\n". @@ -1943,7 +1943,7 @@ sub git_commit { "" . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tree;h=$co{'tree'};hb=$hash")}, "tree") . "" . "\n"; - my $parents = $co{'parents'}; + my $parents = $co{'parents'}; foreach my $par (@$parents) { print "" . "parent" . @@ -2295,16 +2295,13 @@ sub git_history { "\n"; print "
/" . esc_html($file_name) . "
\n"; - open my $fd, "-|", "$gitbin/git-rev-list $hash | $gitbin/git-diff-tree -r --stdin -- \'$file_name\'"; - my $commit; + open my $fd, "-|", + "$gitbin/git-rev-list --full-history $hash -- \'$file_name\'"; print "\n"; my $alternate = 0; while (my $line = <$fd>) { if ($line =~ m/^([0-9a-fA-F]{40})/){ - $commit = $1; - next; - } - if ($line =~ m/^:([0-7]{6}) ([0-7]{6}) ([0-9a-fA-F]{40}) ([0-9a-fA-F]{40}) (.)\t(.*)$/ && (defined $commit)) { + my $commit = $1; my %co = git_read_commit($commit); if (!%co) { next; @@ -2336,7 +2333,6 @@ sub git_history { } print "\n" . "\n"; - undef $commit; } } print "
\n";