new option() function in load.pm to quickly test conf options
reminder: these are enabled by 'option foo = bar' keyword in conf and apply only to the repo
This commit is contained in:
parent
d5ddf6c68d
commit
a6a666af78
|
@ -7,6 +7,7 @@ package Gitolite::Conf::Load;
|
||||||
load
|
load
|
||||||
access
|
access
|
||||||
git_config
|
git_config
|
||||||
|
option
|
||||||
repo_missing
|
repo_missing
|
||||||
vrefs
|
vrefs
|
||||||
lister_dispatch
|
lister_dispatch
|
||||||
|
@ -130,6 +131,14 @@ sub git_config {
|
||||||
return \%ret;
|
return \%ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub option {
|
||||||
|
my ( $repo, $option ) = @_;
|
||||||
|
$option = "gitolite-options.$option";
|
||||||
|
my $ret = git_config( $repo, "^\Q$option\E\$" );
|
||||||
|
return '' unless %$ret;
|
||||||
|
return $ret->{$option};
|
||||||
|
}
|
||||||
|
|
||||||
sub repo_missing {
|
sub repo_missing {
|
||||||
my $repo = shift;
|
my $repo = shift;
|
||||||
return not -d "$rc{GL_REPO_BASE}/$repo.git";
|
return not -d "$rc{GL_REPO_BASE}/$repo.git";
|
||||||
|
|
Loading…
Reference in a new issue