config: prefer core.compression=5
[girocco.git] / gitweb / gitbrowser_config.perl
blob0f2b32eb1d6178290d8d524d38ff8357bd0df560
1 ## For the complete overview of available configuration options,
2 ## see git-browser.git/git-browser.cgi file right after "package inner" line
4 # If $check_path is set to a subroutine reference, it will be called
5 # by get_repo_path with two arguments, the name of the repo and its
6 # path which will be undef if it's not a known repo. If the function
7 # returns false, access to the repo will be denied.
8 # $check_path = sub { my ($name, $path) = @_; $name ~! /restricted/i; };
9 our $check_path = sub {
10 my ($name, $path) = @_;
11 if (not defined $path and
12 $name =~ m!^/*_! ||
13 $name =~ m!\.\.! ||
14 !($name =~ m!\.git/*$!) ||
15 $name =~ m!\.git/.*\.git/*$!i) {
16 return undef;
18 return 1;