-use File::Temp qw/tempdir/;
-my $dir = tempdir('pi-git-XXXXXX', TMPDIR => 1, CLEANUP => 1);
+require './t/common.perl';
+my ($dir, $for_destroy) = tmpdir();
my @cmd = ('git', "--git-dir=$alt", qw(hash-object -w --stdin));
is(system(qw(git init -q --bare), $alt), 0, 'create alt directory');
open my $fh, '<', "$alt/config" or die "open failed: $!\n";
my @cmd = ('git', "--git-dir=$alt", qw(hash-object -w --stdin));
is(system(qw(git init -q --bare), $alt), 0, 'create alt directory');
open my $fh, '<', "$alt/config" or die "open failed: $!\n";