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
|
||||
access
|
||||
git_config
|
||||
option
|
||||
repo_missing
|
||||
vrefs
|
||||
lister_dispatch
|
||||
|
@ -130,6 +131,14 @@ sub git_config {
|
|||
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 {
|
||||
my $repo = shift;
|
||||
return not -d "$rc{GL_REPO_BASE}/$repo.git";
|
||||
|
|
Loading…
Reference in a new issue