Git-Libgit2

 view release on metacpan or  search on metacpan

t/15-diff.t  view on Meta::CPAN

local $ENV{GIT_CONFIG_GLOBAL} = '/dev/null';
local $ENV{GIT_CONFIG_SYSTEM} = '/dev/null';

init_lib();

my $tmp = Path::Tiny->tempdir;
my $repo;
check_rc Git::Libgit2::FFI::git_repository_init( \$repo, "$tmp", 0 );

# Pre-allocate all OID buffers at outer scope so scalar_to_buffer
# pointers stay valid for the whole test (avoids Perl buffer relocation).
my $b1_buf = "\0" x 20;
my $b2_buf = "\0" x 20;
my $t1_buf = "\0" x 20;
my $t2_buf = "\0" x 20;
my $c1_buf = "\0" x 20;
my $c2_buf = "\0" x 20;

# --- blob v1 ---
my ($b1_ptr) = scalar_to_buffer($b1_buf);
my ($c1_content_ptr) = scalar_to_buffer("v1\n");



( run in 1.191 second using v1.01-cache-2.11-cpan-5511b514fd6 )