Branch Coverage

blib/lib/Git/FastExport/Stitch.pm
Criterion Covered Total %
branch 59 70 84.2


line true false branch
33 40 6 if exists $options->{$key}
36 1 45 unless $self->{'select'} =~ /^(?:first|last|random)$/
51 20 42 &blessed($repo) && $repo->isa('Git::Repository') ? :
56 42 0 if (defined $repo) { }
57 1 41 unless chdir $repo
59 0 41 unless chdir $orig
64 1 61 unless $export
68 2 59 if exists $self->{'repo'}{$repo}
74 59 0 if $name eq '.git'
78 59 0 unless defined $dir
81 0 59 if (exists $self->{'name'}{$name})
114 30 1104 unless keys %$repo
117 854 250 if (my $next = &first(sub { $repo->{$_}{'block'}{'type'} ne 'commit'; } , keys %$repo))
130 112 360 $repo->{$next}{'block'}{'committer_date'} < $repo->{$_}{'block'}{'committer_date'} ? :
142 28 222 if ($self->{'last'} and not $commit->{'from'})
163 30 220 unless $commit->{'from'}
164 212 38 unless $commit->{'merge'}
169 234 28 if ($commits->{$parent}{'repo'} eq $node->{'repo'}) { }
177 0 8 unless $commits->{$parent}{'parents'}{$repo}
188 30 220 unless $commit->{'from'}
212 38 unless $commit->{'merge'}
208 58 1105 unless defined $block
212 122 983 if $block->{'type'} =~ /^(?:reset|tag)$/
215 642 463 unless $block->{'mark'}
221 849 256 unless $block->{'from'}
1067 38 unless $block->{'merge'}
229 212 0 if (defined $dir and $dir ne '')
234 0 212 if /^[CR] \S+ \S+ /
257 212 225 unless @{$node->{'children'};}
261 50 175 if grep {$commits->{$_}{'repo'} eq $repo;} @{$$node{'children'};}
272 203 26 unless $peer->{'parents'}{$peer->{'repo'}}
275 0 229 if grep((!exists $pparents{$_}), @{$$parents{$peer->{'repo'}};})
282 175 0 if (@valid)
285 66 0 $self->{'select'} eq 'first' ? :
64 66 $self->{'select'} eq 'last' ? :