| 1 | package Git::Release::Remote; | ||||||||||
| 2 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 1 | has name => ( is => 'rw' , isa => 'Str' ); | |||||||||
| 5 | |||||||||||
| 6 | 1 | has manager => ( is => 'rw' , isa => 'Git::Release' ); | |||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | has info => (is => 'rw', isa => 'HashRef' , lazy => 1, default => sub { | ||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||
| 9 | 0 | my $self = shift; | |||||||||
| 10 | 0 | my @lines = $self->manager->repo->command(qw(remote show), $self->name); | |||||||||
| 11 | 0 | my %info = ( tracking => { } ); | |||||||||
| 12 | 0 | for my $line ( @lines ) { | |||||||||
| 13 | 0 | ▶ | if( ($line =~ m{^\s*(\S+)\s*pushes to (\S+)\s*\((.*?)\)}) ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 0 | $info{tracking}->{ $1 } = 'remotes/' . $self->name . '/' . $2; | |||||||||
| 15 | } | ||||||||||
| 16 | } | ||||||||||
| 17 | 0 | return \%info; | |||||||||
| 18 | 1 | }); | |||||||||
| 19 | |||||||||||
| 20 | 1 | 1; | |||||||||