summaryrefslogtreecommitdiff
path: root/libpiny/lib
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2011-05-07 00:16:41 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2011-05-07 00:16:41 -0700
commite95abb17142830142641ef14266ddcbdaa919dcd (patch)
tree0078851621856d675a5cc594eb25e4ec3dc00d0d /libpiny/lib
parent60838c7a8c3e7ce5dd903288e9a301447b15557a (diff)
downloadpiny-code-e95abb17142830142641ef14266ddcbdaa919dcd.tar.gz
piny-code-e95abb17142830142641ef14266ddcbdaa919dcd.zip
Reorganizing creation lines to maximize likelihood of preserving ownership
Diffstat (limited to 'libpiny/lib')
-rw-r--r--libpiny/lib/Piny/Repo.pm4
1 files changed, 2 insertions, 2 deletions
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;