Branch Coverage

blib/lib/Git/FastExport/Stitch.pm
Criterion Covered Total %
branch 58 72 80.5


line true false branch
33 42 6 if exists $options->{$key}
36 1 47 unless $self->{'select'} =~ /^(?:first|last|random)$/
51 21 45 &blessed($repo) && $repo->isa('Git::Repository') ? :
56 45 0 if (defined $repo) { }
57 1 44 unless chdir $repo
59 0 44 unless chdir $orig
64 1 65 unless $export
68 2 63 if exists $self->{'repo'}{$repo}
74 63 0 if $name eq '.git'
76 63 0 unless defined $dir
81 0 63 if (exists $self->{'name'}{$name})
88 0 63 if $export->version_lt('1.5.4')
118 32 720 unless keys %$repo
121 456 264 if (my $next = &first(sub { $repo->{$_}{'block'}{'type'} ne 'commit'; } , keys %$repo))
134 115 383 $repo->{$next}{'block'}{'committer_date'} < $repo->{$_}{'block'}{'committer_date'} ? :
146 30 234 if ($self->{'last'} and not $commit->{'from'})
167 32 232 unless $commit->{'from'}
168 226 38 unless $commit->{'merge'}
173 244 30 if ($commits->{$parent}{'repo'} eq $node->{'repo'}) { }
181 0 8 unless $commits->{$parent}{'parents'}{$repo}
192 32 232 unless $commit->{'from'}
226 38 unless $commit->{'merge'}
212 62 721 unless defined $block
216 131 590 if $block->{'type'} =~ /^(?:reset|tag)$/
219 457 264 unless $block->{'mark'}
225 451 270 unless $block->{'from'}
683 38 unless $block->{'merge'}
233 0 0 if (defined $dir and $dir ne '')
238 0 0 if /^[CR] \S+ \S+ /
261 222 235 unless @{$node->{'children'};}
265 52 183 if grep {$commits->{$_}{'repo'} eq $repo;} @{$$node{'children'};}
276 209 28 unless $peer->{'parents'}{$peer->{'repo'}}
279 0 237 if grep((!exists $pparents{$_}), @{$$parents{$peer->{'repo'}};})
286 183 0 if (@valid)
289 70 0 $self->{'select'} eq 'first' ? :
68 70 $self->{'select'} eq 'last' ? :