Git::Repository::Log - Class representing git log data
# load the Log plugin use Git::Repository 'Log'; # get the log for last commit my ($log) = Git::Repository->log( '-1' ); # get the author's email print my $email = $log->author_email;
Git::Repository::Log is a class whose instances represent log items from a git log stream.
Create a new Git::Repository::Log instance, using the list of key/values passed as parameters. The supported keys are (from the output of
git log --pretty=raw):
The commit id (ignoring the extra information added by --decorate).
The tree id.
The parent list, separated by spaces.
The author information.
The committer information.
The log message (including the 4-space indent normally output by git log).
The commit signature.
The mergetag information.
Any extra text that might be added by extra options passed to git log.
Note that since
git tag --pretty=raw does not provide the
encoding header (and provides the message properly decoded), this information will not be available via Git::Repository::Plugin::Log.
The following accessors methods are recognized. They all return scalars, except for
parent(), which returns a list.
The original author/committer line
The log message with the 4-space indent output by git log.
The unindented version of the log message.
Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=Git-Repository-Plugin-Log or by email to firstname.lastname@example.org.
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Philippe Bruhat (BooK) <email@example.com>
Copyright 2010-2013 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.