X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/af2511429b7ac58f6bb27087cdbf4c0fbae847247cb21f0d4db744f7f397d8d3..0792b368cb85d254c192c827440788e79e8c185ad12d977cef5955bd529f7a8b:/gitweb.cgi diff --git a/gitweb.cgi b/gitweb.cgi index fec89e7..10f8fda 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -322,10 +322,12 @@ EOF $searchtext = ""; } my $search_hash; - if (defined $hash) { + if (defined $hash_base) { + $search_hash = $hash_base; + } elsif (defined $hash) { $search_hash = $hash; } else { - $search_hash = "HEAD"; + $search_hash = "HEAD"; } $cgi->param("a", "search"); $cgi->param("h", $search_hash); @@ -1765,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". @@ -1941,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" . @@ -2293,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; @@ -2334,7 +2333,6 @@ sub git_history { } print "\n" . "\n"; - undef $commit; } } print "
\n";