summaryrefslogtreecommitdiff
path: root/libpiny/lib/Piny/Repo.pm
diff options
context:
space:
mode:
authorjrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org>2013-04-12 19:38:00 -0700
committerjrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org>2013-04-12 19:38:00 -0700
commit6d2f9a96f41cf1a3a80add728320c39f4932a319 (patch)
treed8c3e7604a9cf2a3a22723e564c78a0d0dd0a7c0 /libpiny/lib/Piny/Repo.pm
parenta26421a98e3336d447a5656bf9ae262b1de4d42f (diff)
downloadpiny-code-6d2f9a96f41cf1a3a80add728320c39f4932a319.tar.gz
piny-code-6d2f9a96f41cf1a3a80add728320c39f4932a319.zip
libpiny: further corrections to piny.gitpath
Diffstat (limited to 'libpiny/lib/Piny/Repo.pm')
-rw-r--r--libpiny/lib/Piny/Repo.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm
index 031558e..41987c5 100644
--- a/libpiny/lib/Piny/Repo.pm
+++ b/libpiny/lib/Piny/Repo.pm
@@ -464,7 +464,9 @@ sub _change_owner {
sub all_repos {
my ( $class, $dir ) = @_;
- $dir = $s->config->piny_gitpath unless defined $dir;
+ my $config = Piny::Config->new( );
+
+ $dir = $config->piny_gitpath unless defined $dir;
my @ret;
@@ -492,7 +494,7 @@ sub create {
mkdir( $repo->path ) or die "The repo $name appears to already exist! ($!)";
- chdir( $s->config->piny_gitpath ); # so git-clone can do the work of resolving local repo names for us
+ chdir( $repo->config->piny_gitpath ); # so git-clone can do the work of resolving local repo names for us
if ( defined $remote ) {
system( "/bin/chown", $user->name, $repo->path ) and die "Could not change ownership of repo path!"; # permissions are overridden later
if ( system( "/usr/bin/sudo", "-H", "-u", $user->name, "/usr/bin/git", "clone", "--bare", "--no-hardlinks", "--quiet", $remote, $repo->path ) ) { # sudo -u $user needed in order to test user readability of whatever they want to clone. the mode o+rx should probably be masked off if we want private repos to stay private.
@@ -577,7 +579,9 @@ sub _build_group {
sub _build_path {
my ( $s ) = @_;
- return $s->config->piny_gitpath . $s->name . ".git";
+ my $config = Piny::Config->new( ); # New, otherwise we'd wind up recursing. It's considered global anyway.
+
+ return $config->piny_gitpath . "/" . $s->name . ".git";
};
sub _build_description {