Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly deal with multiline fields #5

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
15 changes: 15 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
Revision history for Perl module Git::PurePerl:

0.52 Sat Jun 11 22:22:04 CEST 2016
- fix 'Can't redeclare "my" in "my" ...' error in 5.24 (gregor herrmann)

0.51 Fri Mar 6 13:58:39 CET 2015
- Fix failing test if there is no internet access (Bugdebugger)
- Update repository link in PurePerl.pm (Bugdebugger)
- Update repository link (Сергей Романов)

0.50 Sat Jan 25 14:58:16 CET 2014
- Now with the changes from 0.49 in CHANGES. That's it.

0.49 Sat Jan 25 14:55:42 CET 2014
- qw() in list context is an error now (gregor herrmann)
- Fixed RT#90667 (Zoffix Znet)

0.48 Thu Jul 14 22:53:55 BST 2011
- Translation from Digest::SHA1 to Digest::SHA (Jonas Genannt)
- A git object can also be of zero size. (Christian Walde)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ author 'Leon Brocard <[email protected]>';
abstract 'A Pure Perl interface to Git repositories';
license 'perl';

resources repository => 'git://github.com/bobtfish/git-pureperl.git';
resources repository => 'git://github.com/broquaint/git-pureperl.git';

requires 'Archive::Extract' => '0';
requires 'Compress::Raw::Zlib' => '0';
Expand Down
8 changes: 4 additions & 4 deletions lib/Git/PurePerl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use IO::Socket::INET;
use Path::Class;
use namespace::autoclean;

our $VERSION = '0.48';
our $VERSION = '0.52';
$VERSION = eval $VERSION;

has 'directory' => (
Expand Down Expand Up @@ -156,7 +156,7 @@ sub ref_names {
foreach my $line ( $packed_refs->slurp( chomp => 1 ) ) {
next if $line =~ /^#/;
next if $line =~ /^\^/;
my ( $sha1, my $name ) = split ' ', $line;
my ( $sha1, $name ) = split ' ', $line;
push @names, $name;
}
}
Expand Down Expand Up @@ -202,7 +202,7 @@ sub ref_sha1 {
my $last_sha1;
foreach my $line ( $packed_refs->slurp( chomp => 1 ) ) {
next if $line =~ /^#/;
my ( $sha1, my $name ) = split ' ', $line;
my ( $sha1, $name ) = split ' ', $line;
$sha1 =~ s/^\^//;
$name ||= $last_name;

Expand Down Expand Up @@ -531,7 +531,7 @@ It was mostly based on Grit L<http://grit.rubyforge.org/>.

=head1 MAINTAINANCE

This module is maintained in git at L<http://github.com/bobtfish/git-pureperl/>.
This module is maintained in git at L<http://github.com/broquaint/git-pureperl/>.

Patches are welcome, please come speak to one of the L<Gitalist> team
on C<< #gitalist >>.
Expand Down
2 changes: 1 addition & 1 deletion lib/Git/PurePerl/NewObject.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use MooseX::StrictConstructor;
use Moose::Util::TypeConstraints;
use namespace::autoclean;

enum 'ObjectKind' => qw(commit tree blob tag);
enum 'ObjectKind' => [qw(commit tree blob tag)];

has 'kind' => ( is => 'ro', isa => 'ObjectKind', required => 1 );
has 'size' => ( is => 'ro', isa => 'Int', required => 0, lazy_build => 1 );
Expand Down
2 changes: 1 addition & 1 deletion lib/Git/PurePerl/Object.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use MooseX::StrictConstructor;
use Moose::Util::TypeConstraints;
use namespace::autoclean;

enum 'ObjectKind' => qw(commit tree blob tag);
enum 'ObjectKind' => [qw(commit tree blob tag)];

has 'kind' => ( is => 'ro', isa => 'ObjectKind', required => 1 );
has 'size' => ( is => 'ro', isa => 'Int', required => 1 );
Expand Down
2 changes: 1 addition & 1 deletion t/00_setup.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use warnings;
use Test::More;
use Archive::Extract;

foreach my $name qw(test-project test-project-packs test-project-packs2 test-encoding) {
foreach my $name (qw(test-project test-project-packs test-project-packs2 test-encoding)) {
next if -d $name;
my $ae = Archive::Extract->new( archive => "$name.tgz" );
$ae->extract;
Expand Down
7 changes: 7 additions & 0 deletions t/protocol_gpp.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ use IO::File;
use Path::Class;
use Test::More;

my $socket = IO::Socket::INET->new("www.github.com:80");
if ($socket) {
close ($socket);
} else {
plan skip_all => 'No Internet connection available';
}

my $directory = 'test-protocol';
dir($directory)->rmtree;

Expand Down
2 changes: 1 addition & 1 deletion t/simple.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Path::Class;

my $checkout_directory = dir('t/checkout');

foreach my $directory qw(test-project test-project-packs test-project-packs2)
foreach my $directory (qw(test-project test-project-packs test-project-packs2))
{
my $git = Git::PurePerl->new( directory => $directory );
like( $git->master_sha1, qr/^[a-z0-9]{40}$/ );
Expand Down