/usr/share/perl5/Git/PurePerl/Protocol/Git.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 31 32 | package Git::PurePerl::Protocol::Git;
use Moose;
use MooseX::StrictConstructor;
use Moose::Util::TypeConstraints;
use namespace::autoclean;
extends 'Git::PurePerl::Protocol';
has 'hostname' => ( is => 'ro', isa => 'Str', required => 1 );
has 'port' => ( is => 'ro', isa => 'Int', required => 0, default => 9418 );
has 'project' => ( is => 'rw', isa => 'Str', required => 1 );
sub connect_socket {
my $self = shift;
my $socket = IO::Socket::INET->new(
PeerAddr => $self->hostname,
PeerPort => $self->port,
Proto => 'tcp'
) || die $! . ' ' . $self->hostname . ':' . $self->port;
$socket->autoflush(1) || die $!;
$self->read_socket($socket);
$self->write_socket($socket);
$self->send_line( "git-upload-pack "
. $self->project
. "\0host="
. $self->hostname
. "\0" );
}
1;
|