File Coverage

blib/lib/Git/Raw/Tree.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 18 18 100.0


line stmt bran cond sub pod time code
1             package Git::Raw::Tree;
2             $Git::Raw::Tree::VERSION = '0.86';
3 35     35   228 use strict;
  35         66  
  35         974  
4 35     35   187 use warnings;
  35         68  
  35         2311  
5             use overload
6 7     7   7806 '""' => sub { return $_[0] -> id },
7 35     35   251 fallback => 1;
  35         70  
  35         325  
8              
9 35     35   2658 use Git::Raw;
  35         85  
  35         1371  
10              
11             =head1 NAME
12              
13             Git::Raw::Tree - Git tree class
14              
15             =head1 VERSION
16              
17             version 0.86
18              
19             =head1 DESCRIPTION
20              
21             A L represents a Git tree.
22              
23             B: The API of this module is unstable and may change without warning
24             (any change will be appropriately documented in the changelog).
25              
26             =head1 METHODS
27              
28             =head2 lookup( $repo, $id )
29              
30             Retrieve the tree corresponding to C<$id>. This function is pretty much the same
31             as C<$repo-Elookup($id)> except that it only returns trees. If the tree
32             doesn't exist, this function will return C.
33              
34             =head2 owner( )
35              
36             Retrieve the L owning the tree.
37              
38             =head2 id( )
39              
40             Retrieve the id of the tree, as a string.
41              
42             =head2 entries( )
43              
44             Retrieve a list of L objects.
45              
46             =head2 entry_byname( $name )
47              
48             Retrieve a L object by name. If the entry cannot be found,
49             this function will return C.
50              
51             =head2 entry_bypath( $path )
52              
53             Retrieve a L object by path. If the entry cannot be found,
54             this function will return C.
55              
56             =head2 merge( $ancestor, $theirs, [\%merge_opts] )
57              
58             Merge C<$theirs> into this tree. C<$ancestor> and C<$theirs> should be
59             L objects. See Cmerge()> for valid
60             C<%merge_opts> values. Returns a L object containing the
61             merge result.
62              
63             =head2 diff( [\%diff_opts] )
64              
65             Compute the L between two trees. See
66             Cdiff()> for valid C<%diff_opts> values.
67              
68             =head2 is_tree( )
69              
70             Returns true.
71              
72             =head2 is_blob( )
73              
74             Returns false.
75              
76             =head1 AUTHOR
77              
78             Alessandro Ghedini
79              
80             Jacques Germishuys
81              
82             =head1 LICENSE AND COPYRIGHT
83              
84             Copyright 2012 Alessandro Ghedini.
85              
86             This program is free software; you can redistribute it and/or modify it
87             under the terms of either: the GNU General Public License as published
88             by the Free Software Foundation; or the Artistic License.
89              
90             See http://dev.perl.org/licenses/ for more information.
91              
92             =cut
93              
94             1; # End of Git::Raw::Tree