Git-Repository

 view release on metacpan or  search on metacpan

t/20-simple.t  view on Meta::CPAN

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$ENV{GIT_COMMITTER_NAME}  = 'Test Committer';
$ENV{GIT_COMMITTER_EMAIL} = 'test.committer@example.com';
$ENV{GIT_CONFIG_NOSYSTEM} = 1;
delete $ENV{XDG_CONFIG_HOME};
delete $ENV{HOME};
my $home = cwd;
 
local $/ = chr rand 128;
 
# small helper sub
sub update_file {
    my ( $file, $content ) = @_;
    open my $fh, '>', $file or die "Can't open $file: $!";
    print {$fh} $content;
    close $fh;
}
 
# a place to put a git repository
my $dir = abs_path( tempdir( CLEANUP => 1 ) );
 
# a quiet git init:



( run in 0.512 second using v1.01-cache-2.11-cpan-95122f20152 )