$dir = cwd unless defined $dir;
my ($repo, $bare, $name, $work);
if ($args{fake}) {
- $work = $dir;
+ $repo = $work = $dir;
} else {
my @tries = ($dir);
my @chunks = splitdir $dir;
([ [ qw/^n ^g ^w ^b ^^/ ] ]) x 5
);
+local $ENV{GIT_DIR} = 't';
+local $ENV{GIT_EXEC_PATH} = abs_path('t/bin/git');
+
for my $cmd (qw/daemon gui help init version/) {
my ($fh, $filename) = tempfile(UNLINK => 1);
my $ar = App::Rgit->new(
- git => abs_path('t/bin/git'),
- root => 't',
+ git => $ENV{GIT_EXEC_PATH},
+ root => $ENV{GIT_DIR},
cmd => $cmd,
args => [ abs_path($filename), $cmd, qw/^n ^g ^w ^b ^^/ ]
);