~ubuntu-branches/ubuntu/vivid/gitolite3/vivid-proposed

« back to all changes in this revision

Viewing changes to src/lib/Gitolite/Conf/Load.pm

  • Committer: Package Import Robot
  • Author(s): David Bremner
  • Date: 2013-07-30 22:47:45 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130730224745-fhyqb6fvrbr6uxgt
Tags: 3.5.2-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
  access
10
10
  git_config
 
11
  env_options
11
12
 
12
13
  option
13
14
  repo_missing
18
19
);
19
20
 
20
21
use Exporter 'import';
 
22
use Cwd;
21
23
 
22
24
use Gitolite::Common;
23
25
use Gitolite::Rc;
184
186
    return \%ret;
185
187
}
186
188
 
 
189
sub env_options {
 
190
    return unless -f "$rc{GL_ADMIN_BASE}/conf/gitolite.conf-compiled.pm";
 
191
        # prevent catch-22 during initial install
 
192
 
 
193
    my $cwd = getcwd();
 
194
 
 
195
    my $repo = shift;
 
196
    map { delete $ENV{$_} } grep { /^GL_OPTION_/ } keys %ENV;
 
197
    my $h = git_config( $repo, '^gitolite-options.ENV\.' );
 
198
    while (my ($k, $v) = each %$h) {
 
199
        next unless $k =~ /^gitolite-options.ENV\.(\w+)$/;
 
200
        $ENV{"GL_OPTION_" . $1} = $v;
 
201
    }
 
202
 
 
203
    chdir($cwd);
 
204
}
 
205
 
187
206
sub option {
188
207
    my ( $repo, $option ) = @_;
189
208
    $option = "gitolite-options.$option";