]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Use undef for die_error to use default first (status) parameter value
[Gitweb] / gitweb.perl
index 9ab1f17736d6ed10ff0d251961642af918e039de4d4abe4dbc9820cecb51cda8..4821374d8ad663f65a625e2447152348e7bda36a369d78ec067d87e1d72ad5de 100755 (executable)
@@ -68,9 +68,10 @@ our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown";
 
 $projects_list ||= $projectroot;
 if (! -d $git_temp) {
-       mkdir($git_temp, 0700) || die_error("Couldn't mkdir $git_temp");
+       mkdir($git_temp, 0700) || die_error(undef, "Couldn't mkdir $git_temp");
 }
 
+# ======================================================================
 # input validation and dispatch
 our $action = $cgi->param('a');
 if (defined $action) {
@@ -78,6 +79,7 @@ if (defined $action) {
                undef $action;
                die_error(undef, "Invalid action parameter.");
        }
+       # action which does not check rest of parameters
        if ($action eq "opml") {
                git_opml();
                exit;
@@ -1656,7 +1658,7 @@ sub git_blob_plain {
        }
        my $type = shift;
        open my $fd, "-|", $GIT, "cat-file", "blob", $hash
-               or die_error("Couldn't cat $file_name, $hash");
+               or die_error(undef, "Couldn't cat $file_name, $hash");
 
        $type ||= git_blob_plain_mimetype($fd, $file_name);
 
@@ -2321,7 +2323,7 @@ sub git_history {
 
 sub git_search {
        if (!defined $searchtext) {
-               die_error("", "Text field empty.");
+               die_error(undef, "Text field empty.");
        }
        if (!defined $hash) {
                $hash = git_read_head($project);
This page took 0.348491 seconds and 4 git commands to generate.