File Coverage

blib/lib/Git/Raw/Indexer.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Git::Raw::Indexer;
2             $Git::Raw::Indexer::VERSION = '0.86';
3 35     35   223 use strict;
  35         74  
  35         995  
4 35     35   170 use warnings;
  35         62  
  35         867  
5              
6 35     35   196 use Git::Raw;
  35         80  
  35         1260  
7              
8             =head1 NAME
9              
10             Git::Raw::Indexer - Git indexer class
11              
12             =head1 VERSION
13              
14             version 0.86
15              
16             =head1 DESCRIPTION
17              
18             A L represents a git indexer object.
19              
20             =head1 METHODS
21              
22             =head2 new( $directory, $odb )
23              
24             Create a new indexer. C<$directory> is the directory where the packfile and
25             index should be stored.
26              
27             =head2 append( $data, $progress )
28              
29             Add C<$data> to the indexer. C<$progress> should be a L
30             object.
31              
32             =head2 commit( $progress )
33              
34             Finalize the pack and index. This will resolve any pending deltas and write out
35             the index file. C<$progress> should be a L object.
36              
37             =head2 hash( )
38              
39             Retrieve the packfile's hash. A packfile's name is derived from the sorted
40             hashing of all object names. This is only correct after the index has been
41             finalized.
42              
43             =head1 AUTHOR
44              
45             Jacques Germishuys
46              
47             =head1 LICENSE AND COPYRIGHT
48              
49             Copyright 2016 Jacques Germishuys.
50              
51             This program is free software; you can redistribute it and/or modify it
52             under the terms of either: the GNU General Public License as published
53             by the Free Software Foundation; or the Artistic License.
54              
55             See http://dev.perl.org/licenses/ for more information.
56              
57             =cut
58              
59             1; # End of Git::Raw::Indexer