Git::Database::Object::Commit - A commit object in the Git object database
version 0.012
my $r = Git::Database->new(); # current Git repository my $commit = $r->get_object('ef25e8'); # abbreviated digest # attributes $commit->kind; # commit $commit->digest; # ef25e81ba86b7df16956c974c8a9c1ff2eca1326 $commit->tree_digest; # b52168be5ea341e918a9cbbb76012375170a439f $commit->parents_digest; # [] ...; # etc., see below
Git::Database::Object::Commit represents a commit object obtained via Git::Database from a Git object database.
commit
All major attributes ("digest", "content", "size", "commit_info") have a predicate method.
The object kind: commit.
The SHA-1 digest of the commit object.
The object's actual content.
The size (in bytes) of the object content.
A hash reference containing the all the attributes listed below, as values for the keys with the same names.
The SHA-1 digest of the tree object corresponding to the commit.
An array reference containing the list of SHA-1 digests of the commit's parents.
A Git::Database::Actor object representing the author of the commit.
A DateTime object representing the date at which the author created the commit.
A Git::Database::Actor object representing the committer of the commit.
A DateTime object representing the date at which the committer created the commit.
The text of the commit message.
The encoding of the commit message.
Create a new Git::Object::Database::Commit object.
One (and only one) of the content or commit_info arguments is required.
content
commit_info
commit_info is a reference to a hash containing the keys listed above, i.e. tree_digest, parents_digest (optional), author, author_date, committer, committer_date, comment, and encoding (optional).
tree_digest
parents_digest
author
author_date
committer
committer_date
comment
encoding
Git::Database, Git::Database::Role::Object.
Philippe Bruhat (BooK) <book@cpan.org>.
Copyright 2013-2016 Philippe Bruhat (BooK), all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Git::Database, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::Database
CPAN shell
perl -MCPAN -e shell install Git::Database
For more information on module installation, please visit the detailed CPAN module installation guide.