Skip to content

Commit

Permalink
gitweb.cgi: Show "raw" head of project link even when $hash is not de…
Browse files Browse the repository at this point in the history
…fined

Some callers of git_history() do not set $hash of $file_name.
Add code to find it, if it is not defined.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Luben Tuikov authored and Junio C Hamano committed Jul 25, 2006
1 parent cff0771 commit 93d5f06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gitweb/gitweb.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -2326,6 +2326,9 @@ sub git_history {
print "<div>\n" .
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash_base"), -class => "title"}, esc_html($co{'title'})) . "\n" .
"</div>\n";
if (!defined $hash && defined $file_name) {
$hash = git_get_hash_by_path($hash_base, $file_name);
}
if (defined $hash) {
my $ftype = git_get_type($hash);

Expand Down

0 comments on commit 93d5f06

Please sign in to comment.