/usr/share/perl5/Git/PurePerl/NewObject/Tree.pm is in libgit-pureperl-perl 0.50-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | package Git::PurePerl::NewObject::Tree;
use Moose;
use MooseX::StrictConstructor;
use Moose::Util::TypeConstraints;
use namespace::autoclean;
extends 'Git::PurePerl::NewObject';
has 'kind' =>
( is => 'ro', isa => 'ObjectKind', required => 1, default => 'tree' );
has 'directory_entries' => (
is => 'rw',
isa => 'ArrayRef[Git::PurePerl::NewDirectoryEntry]',
required => 1,
auto_deref => 1,
);
sub _build_content {
my $self = shift;
my $content;
foreach my $de ( $self->directory_entries ) {
$content
.= $de->mode . ' '
. $de->filename . "\0"
. pack( 'H*', $de->sha1 );
}
$self->content($content);
}
__PACKAGE__->meta->make_immutable;
|