fixed up several broken URLs (minor but annoying)
[gitolite.git] / src / commands / create
blob8565e68198d354831f23e0651dd2d6131e5d0335
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
5 use lib $ENV{GL_LIBDIR};
6 use Gitolite::Rc;
7 use Gitolite::Common;
8 use Gitolite::Conf::Load;
9 use Gitolite::Conf::Store;
11 =for usage
12 create -- create a wild repo.
14 Usage:
15 ssh git@host create <repo>
16 =cut
18 usage() if @ARGV != 1 or $ARGV[0] eq '-h';
20 $ENV{GL_USER} or _die "GL_USER not set";
22 my $repo = shift;
23 _die "invalid repo '$repo'" unless $repo =~ $REPONAME_PATT;
25 my $ret = access( $repo, $ENV{GL_USER}, '^C', 'any' );
26 _die "repo already exists or you are not authorised to create it" if $ret =~ /DENIED/;
28 new_wild_repo( $repo, $ENV{GL_USER}, 'create' );
29 gl_log( 'create', $repo, $ENV{GL_USER}, 'create' );