summaryrefslogtreecommitdiff
path: root/libpiny/lib/Piny/Repo.pm
diff options
context:
space:
mode:
Diffstat (limited to 'libpiny/lib/Piny/Repo.pm')
-rw-r--r--libpiny/lib/Piny/Repo.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm
index 8a7f54e..174659f 100644
--- a/libpiny/lib/Piny/Repo.pm
+++ b/libpiny/lib/Piny/Repo.pm
@@ -262,6 +262,20 @@ sub rebuild_git {
};
};
+ unless( -d $s->path . "/snowflakes" ) {
+ mkdir( $s->path . "/snowflakes" ) or die "Could not mkdir snowflakes: $!";
+ };
+
+ unless( -l $s->path . "/packed-refs" ) {
+ rename( $s->path . "/packed-refs", $s->path . "/snowflakes/packed-refs" ) or die "Could not rename packed-refs: $!";
+ symlink( "snowflakes/packed-refs", $s->path . "/packed-refs" ) or die "Could not symlink packed-refs: $!";
+ };
+
+ unless( -l $s->path . "/HEAD" ) {
+ rename( $s->path . "/HEAD", $s->path . "/refs/HEAD" ) or die "Could not rename HEAD: $!";
+ symlink( "refs/HEAD", $s->path . "/HEAD" ) or die "Could not symlink HEAD: $!";
+ };
+
foreach( "info", "logs", "branches" ) {
(-e $s->path . "/" . $_) or mkdir( $s->path . "/" . $_ ) or die "Could not mkdir $_ for repo: $!";
};