mirror of
https://github.com/git/git
synced 2024-11-05 01:58:18 +00:00
Merge branch 'mj/gitweb-unreadable-config-error'
When given an existing but unreadable file as a configuration file, gitweb behaved as if the file did not exist at all, but now it errors out. This is a change that may break backward compatibility. * mj/gitweb-unreadable-config-error: gitweb: die when a configuration file cannot be read
This commit is contained in:
commit
b700f119d1
1 changed files with 3 additions and 1 deletions
|
@ -728,9 +728,11 @@ sub filter_and_validate_refs {
|
|||
sub read_config_file {
|
||||
my $filename = shift;
|
||||
return unless defined $filename;
|
||||
# die if there are errors parsing config file
|
||||
if (-e $filename) {
|
||||
do $filename;
|
||||
# die if there is a problem accessing the file
|
||||
die $! if $!;
|
||||
# die if there are errors parsing config file
|
||||
die $@ if $@;
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue