line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Git::FastExport::Block; |
2
|
|
|
|
|
|
|
$Git::FastExport::Block::VERSION = '0.106'; |
3
|
5
|
|
|
5
|
|
23
|
use strict; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
157
|
|
4
|
5
|
|
|
5
|
|
25
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
1214
|
|
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
|
604
|
|
|
604
|
1
|
32212
|
my ($self) = @_; |
22
|
604
|
|
|
|
|
1414
|
my $string = $self->{header} . $LF; |
23
|
|
|
|
|
|
|
|
24
|
604
|
|
|
|
|
1035
|
for my $key ( @{ $fields{ $self->{type} } } ) { |
|
604
|
|
|
|
|
1593
|
|
25
|
2381
|
100
|
|
|
|
4708
|
next if !exists $self->{$key}; |
26
|
2073
|
100
|
|
|
|
2990
|
if ( $key eq 'data' ) { |
27
|
|
|
|
|
|
|
$string |
28
|
484
|
|
|
|
|
1593
|
.= 'data ' . length( $self->{data} ) . $LF . $self->{data}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
else { |
31
|
1589
|
|
|
|
|
1174
|
$string .= "$_$LF" for @{ $self->{$key} }; |
|
1589
|
|
|
|
|
6600
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
604
|
|
100
|
|
|
20200
|
return $string .= $self->{footer} || ''; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
'progress 1 objects'; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |