Skip to content

Commit 914fad2

Browse files
committed
Parse ssh:// urls as well
1 parent ab31b93 commit 914fad2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Git/PurePerl/Protocol.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use Moose::Util::TypeConstraints;
55

66
use Git::PurePerl::Protocol::Git;
77
use Git::PurePerl::Protocol::SSH;
8-
use Git::PurePerl::Protocol::SSH;
98

109
has 'remote' => ( is => 'ro', isa => 'Str', required => 1 );
1110
has 'read_socket' => ( is => 'rw', required => 0 );
@@ -20,7 +19,8 @@ sub connect {
2019
hostname => $2,
2120
project => $3,
2221
);
23-
} elsif ($self->remote =~ m{^(?:(.*?)@)?(.*?):(.*)}) {
22+
} elsif ($self->remote =~ m{^ssh://(?:(.*?)@)?(.*?)(/.*)}
23+
or $self->remote =~ m{^(?:(.*?)@)?(.*?):(.*)}) {
2424
Git::PurePerl::Protocol::SSH->meta->rebless_instance(
2525
$self,
2626
$1 ? (username => $1) : (),

0 commit comments

Comments
 (0)