summaryrefslogtreecommitdiff
path: root/libpiny
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@fairlystable.org>2024-09-18 12:19:25 -0700
committerJoe Rayhawk <jrayhawk@fairlystable.org>2024-09-18 12:19:25 -0700
commitad88f6d199ad33715645b7eae5881ab3a489a1fb (patch)
tree4016ba1b5d29ffd599583f763241b70466719959 /libpiny
parent9d676f704498bd31a6a7691ea7ccebd588ea913d (diff)
downloadpiny-code-ad88f6d199ad33715645b7eae5881ab3a489a1fb.tar.gz
piny-code-ad88f6d199ad33715645b7eae5881ab3a489a1fb.zip
libpiny/lib/Piny/Repo.pm: add $GIT_DIR/incoming/ as required by recent versions of gitHEADmaster
Diffstat (limited to 'libpiny')
-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 c4ec47a..d213168 100644
--- a/libpiny/lib/Piny/Repo.pm
+++ b/libpiny/lib/Piny/Repo.pm
@@ -262,6 +262,10 @@ sub rebuild_git {
};
};
+ unless( -d $s->path . "/incoming" ) {
+ mkdir( $s->path . "/incoming" ) or die "Could not mkdir incoming: $!";
+ };
+
unless( -d $s->path . "/snowflakes" ) {
mkdir( $s->path . "/snowflakes" ) or die "Could not mkdir snowflakes: $!";
};
@@ -301,10 +305,10 @@ sub rebuild_git {
};
# FIXME: we should verify we are not breaking someone else's object hardlinks with these chmod or chown operations
- system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/snowflakes -type d -print0 | /usr/bin/xargs -0 /bin/chmod $dirperm" ) and die "Could not chmod shared git resources!";
+ system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/incoming " . $s->path . "/snowflakes -type d -print0 | /usr/bin/xargs -0 /bin/chmod $dirperm" ) and die "Could not chmod shared git resources!";
system( "/usr/bin/find " . $s->path . "/objects " . "-type f -print0 | /usr/bin/xargs -0 --no-run-if-empty /bin/chmod $immutablefileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level
- system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/snowflakes -type f -print0 | /usr/bin/xargs -0 /bin/chmod $fileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level
- system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/snowflakes -print0 | /usr/bin/xargs -0 /bin/chgrp " . $s->group->name ) and die "Could not chgrp shared git resources!";
+ system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/incoming " . $s->path . "/snowflakes -type f -print0 | /usr/bin/xargs -0 /bin/chmod $fileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level
+ system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/incoming " . $s->path . "/snowflakes -print0 | /usr/bin/xargs -0 /bin/chgrp " . $s->group->name ) and die "Could not chgrp shared git resources!";
$ENV{"GIT_DIR"} = $s->path;
system( "/usr/bin/git", "config", "gitweb.owner", $s->owner->email->address ) and die "Could not git config gitweb.owner!";