sub playtree_setup (;$) {
my ($t_local_git_cfg) = @_;
$t_local_git_cfg //= $local_git_cfg;
- # should be run in a directory .git/FOO/BAR of a working tree
+ # for use in the playtree
+ # $maindir must be set, eg by calling record_maindir or fresh_playground
runcmd qw(git init -q);
runcmd qw(git config gc.auto 0);
foreach my $copy (qw(user.email user.name user.useConfigOnly
runcmd qw(git config), $copy, $_ foreach @$v;
}
rmtree('.git/objects');
- symlink '../../../../objects','.git/objects' or die $!;
+ symlink "$maindir/.git/objects",'.git/objects' or die $!;
ensuredir '.git/info';
open GA, "> .git/info/attributes" or die $!;
print GA "* $negate_harmful_gitattrs\n" or die $!;