File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 11Revision history for Perl module Git::PurePerl:
22
3+ - Add basic documentation for Object::Commit (Kent Fredric)
34 - Add has_ancestor_sha1 method to Object::Commit (Kent Fredric)
45 - Add Git::PurePerl::Util with handy current_git_dir() util (Kent Fredric)
56
Original file line number Diff line number Diff line change @@ -63,6 +63,13 @@ sub BUILD {
6363 $self -> comment( decode($encoding , join " \n " , @lines ) );
6464}
6565
66+ =head1 METHODS
67+
68+ =head2 tree
69+
70+ Returns the L<< C<::Tree> |Git::PurePerl::Object::Tree >> associated with this commit.
71+
72+ =cut
6673
6774sub tree {
6875 my $self = shift ;
@@ -76,15 +83,33 @@ sub _push_parent_sha1 {
7683 push (@{$self -> parent_sha1s}, $sha1 );
7784}
7885
86+ =head2 parent_sha1
87+
88+ Returns the C<sha1 > for the first parent of this this commit.
89+
90+ =cut
91+
7992sub parent_sha1 {
8093 return shift -> parent_sha1s-> [0];
8194}
82-
95+
96+ =head2 parent
97+
98+ Returns the L<< C<::Commit> |Git::PurePerl::Object::Commit >> for this commits first parent.
99+
100+ =cut
101+
83102sub parent {
84103 my $self = shift ;
85104 return $self -> git-> get_object( $self -> parent_sha1 );
86105}
87106
107+ =head2 parents
108+
109+ Returns L<< C<::Commit> s|Git::PurePerl::Object::Commit >> for all this commits parents.
110+
111+ =cut
112+
88113sub parents {
89114 my $self = shift ;
90115
You can’t perform that action at this time.
0 commit comments