gitweb.cgi: Show "raw" head of project link even when $hash is not defined
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>
This commit is contained in:
parent
cff0771bfb
commit
93d5f0619c
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user