line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Git::FastExport::Block; |
2
|
|
|
|
|
|
|
$Git::FastExport::Block::VERSION = '0.108'; |
3
|
4
|
|
|
4
|
|
29
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
114
|
|
4
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
985
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my $LF = "\012"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my %fields = ( |
9
|
|
|
|
|
|
|
commit => [qw( mark author committer data from merge files )], |
10
|
|
|
|
|
|
|
tag => [qw( from tagger data )], |
11
|
|
|
|
|
|
|
reset => [qw( from )], |
12
|
|
|
|
|
|
|
blob => [qw( mark data )], |
13
|
|
|
|
|
|
|
checkpoint => [], |
14
|
|
|
|
|
|
|
progress => [], |
15
|
|
|
|
|
|
|
feature => [], |
16
|
|
|
|
|
|
|
option => [], |
17
|
|
|
|
|
|
|
done => [], |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub as_string { |
21
|
414
|
|
|
414
|
1
|
29750
|
my ($self) = @_; |
22
|
414
|
|
|
|
|
890
|
my $string = $self->{header} . $LF; |
23
|
|
|
|
|
|
|
|
24
|
414
|
|
|
|
|
570
|
for my $key ( @{ $fields{ $self->{type} } } ) { |
|
414
|
|
|
|
|
975
|
|
25
|
2063
|
100
|
|
|
|
4024
|
next if !exists $self->{$key}; |
26
|
1735
|
100
|
|
|
|
2740
|
if ( $key eq 'data' ) { |
27
|
|
|
|
|
|
|
$string |
28
|
286
|
|
|
|
|
838
|
.= 'data ' . length( $self->{data} ) . $LF . $self->{data}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
else { |
31
|
1449
|
|
|
|
|
1822
|
$string .= "$_$LF" for @{ $self->{$key} }; |
|
1449
|
|
|
|
|
3865
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
414
|
|
100
|
|
|
12212
|
return $string .= $self->{footer} || ''; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
'progress 1 objects'; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |