@ -683,7 +683,7 @@ sub evaluate_gitweb_config {
our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "++GITWEB_CONFIG_COMMON++";
our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "++GITWEB_CONFIG_COMMON++";
# Protect agains duplications of file names, to not read config twice.
# Protect against duplications of file names, to not read config twice.
# Only one of $GITWEB_CONFIG and $GITWEB_CONFIG_SYSTEM is used, so
# Only one of $GITWEB_CONFIG and $GITWEB_CONFIG_SYSTEM is used, so
# there possibility of duplication of filename there doesn't matter.
# there possibility of duplication of filename there doesn't matter.
$GITWEB_CONFIG = "" if ($GITWEB_CONFIG eq $GITWEB_CONFIG_COMMON);
$GITWEB_CONFIG = "" if ($GITWEB_CONFIG eq $GITWEB_CONFIG_COMMON);
@ -1136,7 +1136,7 @@ sub handle_errors_html {
# to avoid infinite loop where error occurs in die_error,
# to avoid infinite loop where error occurs in die_error,
# change handler to default handler, disabling handle_errors_html
# change handler to default handler, disabling handle_errors_html
set_message("Error occured when inside die_error:\n$msg");
set_message("Error occurred when inside die_error:\n$msg");
# you cannot jump out of die_error when called as error handler;
# you cannot jump out of die_error when called as error handler;
# the subroutine set via CGI::Carp::set_message is called _after_
# the subroutine set via CGI::Carp::set_message is called _after_
@ -7485,7 +7485,7 @@ sub git_object {
system(git_cmd(), "cat-file", '-e', $hash_base) == 0
system(git_cmd(), "cat-file", '-e', $hash_base) == 0
or die_error(404, "Base object does not exist");
or die_error(404, "Base object does not exist");
# here errors should not hapen
# here errors should not happen
open my $fd, "-|", git_cmd(), "ls-tree", $hash_base, "--", $file_name
open my $fd, "-|", git_cmd(), "ls-tree", $hash_base, "--", $file_name
or die_error(500, "Open git-ls-tree failed");
or die_error(500, "Open git-ls-tree failed");
my $line = <$fd>;
my $line = <$fd>;