From e95abb17142830142641ef14266ddcbdaa919dcd Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Sat, 7 May 2011 00:16:41 -0700 Subject: Reorganizing creation lines to maximize likelihood of preserving ownership --- libpiny/lib/Piny/Repo.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpiny/lib/Piny') diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index a26450f..4f520b8 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -401,14 +401,14 @@ sub create { system( "/usr/bin/git", "init", "--bare", "--quiet", "--shared" ) and die "Could not initialize git repo!"; delete $ENV{"GIT_DIR"}; + system( "/bin/chown", "-R", $user->name, $repo->path . "/objects" ) and die "Could not change ownership of $_ for repo: $!"; + if ( defined $source ) { $ENV{"GIT_DIR"} = $source; system( "/usr/bin/git", "push", "--mirror", $repo->path ) and die "Could not push refs to new repository!"; delete $ENV{"GIT_DIR"}; }; - system( "/bin/chown", "-R", $user->name, $repo->path . "/objects" ) and die "Could not change ownership of $_ for repo: $!"; - $repo->description( $description ); $repo->rebuild; -- cgit v1.2.3