summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpiny/lib/Piny/Repo.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm
index 8c38323..82f651d 100644
--- a/libpiny/lib/Piny/Repo.pm
+++ b/libpiny/lib/Piny/Repo.pm
@@ -279,14 +279,6 @@ sub rebuild_git {
system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/packed-refs -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 . "/packed-refs -print0 | /usr/bin/xargs -0 /bin/chgrp " . $s->group->name ) and die "Could not chgrp shared git resources!";
- chown( 0, 0, $s->path ) or die "Could not change ownership of " . $s->path;
- chmod( 00755, $s->path ) or die "Could not change mode of " . $s->path;
-
- foreach( "config", "description", "git-daemon-export-ok" ) {
- chown( 0, 0, $s->path . "/" . $_ ) or die "Could not change ownership of $_!";
- chmod( 00644, $s->path . "/" . $_ ) or die "Could not change mode of $_!";
- };
-
$ENV{"GIT_DIR"} = $s->path;
system( "/usr/bin/git", "config", "gitweb.owner", $s->owner->email->address ) and die "Could not git config gitweb.owner!";
# packed-refs files aren't modifiable under our permission system and are poorly supported on old version of git anyway.
@@ -295,6 +287,14 @@ sub rebuild_git {
system( "/usr/bin/git", "config", "core.sharedrepository", $s->config->core_sharedrepository ) and die "Could not git config core.sharedrepository!";
delete $ENV{"GIT_DIR"};
+ chown( 0, 0, $s->path ) or die "Could not change ownership of " . $s->path;
+ chmod( 00755, $s->path ) or die "Could not change mode of " . $s->path;
+
+ foreach( "config", "description", "git-daemon-export-ok" ) {
+ chown( 0, 0, $s->path . "/" . $_ ) or die "Could not change ownership of $_!";
+ chmod( 00644, $s->path . "/" . $_ ) or die "Could not change mode of $_!";
+ };
+
$s->clear_config;
$s->config->save;
@@ -720,7 +720,7 @@ sub _build_ikiwiki_historyurl {
sub _build_ikiwiki_diffurl {
my ( $s ) = @_;
- return $s->cgit_url . "/log/[[file]]";
+ return $s->cgit_url . "/commit/?id=[[sha1_commit]]";
};
sub _build_apache_global_config {