summaryrefslogtreecommitdiffstats
path: root/src/commands/owns
blob: d1d87576a1b8beef403d73c3abeb7597d09698a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
use strict;
use warnings;

use lib $ENV{GL_LIBDIR};
use Gitolite::Easy;

=for usage
Usage:  gitolite owns <reponame>

Checks if $GL_USER is an owner of the repo and returns an exit code (shell
truth, 0 for success), which makes it possible to do this in shell:

    if gitolite owns someRepo
    then
        ...
=cut

usage() if not @ARGV or $ARGV[0] eq '-h';
my $repo = shift;

exit not owns($repo);