X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/82e574fa07166107cd47286cfe54fa27ee52a16c44e9daedcf69f06a9bce69ea..34ad37e62846aad75906720a7c8c2aec8cf4f105ed784fea75bc5a0a6845b798:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 144369c..2298acf 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -459,10 +459,16 @@ my %actions = ( "project_index" => \&git_project_index, ); -if (defined $project) { - $action ||= 'summary'; -} else { - $action ||= 'project_list'; +if (!defined $action) { + if (defined $hash) { + $action = git_get_type($hash); + } elsif (defined $hash_base && defined $file_name) { + $action = git_get_type("$hash_base:$file_name"); + } elsif (defined $project) { + $action = 'summary'; + } else { + $action = 'project_list'; + } } if (!defined($actions{$action})) { die_error(undef, "Unknown action");