]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: choose appropriate view for file type if a= parameter missing
[Gitweb] / gitweb.perl
index 144369cf8a78dacb3cba78006e204cbaf133e461032579e92d0f70b5e403afdf..2298acf2421170eea8694f6159fb80efafd7629ca0b6b678c46744f14d88803d 100755 (executable)
@@ -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");
This page took 0.130213 seconds and 4 git commands to generate.