Git-Repository-Plugin-Log-1.310000755001750001750 012236134762 15446 5ustar00bookbook000000000000README100644001750001750 167112236134762 16414 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310Git-Repository-Plugin-Log Git::Repository::Plugin::Log adds a log() method to Git::Repository, which will return Git::Repository::Log objects representing the commit information provided by `git log`. SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc Git::Repository::Plugin::Log You can also look for information at: RT, CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=Git-Repository-Plugin-Log AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/Git-Repository-Plugin-Log CPAN Ratings http://cpanratings.perl.org/d/Git-Repository-Plugin-Log Search CPAN http://search.cpan.org/dist/Git-Repository-Plugin-Log COPYRIGHT AND LICENCE Copyright (C) 2010-2013 Philippe Bruhat (BooK) This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Changes100644001750001750 160512236134762 17024 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310Revision history for Git-Repository-Plugin-Log Git::Repository::Plugin::Log and support modules used to be packaged in the Git-Repository distribution from version 1.13 (which introduced capability to write plugins) to 1.308. For earlier history, please consult the changelog for that distribution. 1.310 Tue Nov 5 2013 [ENHANCEMENTS] - Git::Repository::Log now properly handles commits where the author or committer name is empty 1.309 Sun Nov 3 2013 [ENHANCEMENTS] - the mergetag key is now an array reference, to support commits with multiple mergetag headers [TESTS] - tested using a bundle containing several very special cases (see http://github.com/book/git-test-repo-tool/) [PACKAGING] - split into its own distribution as of Git-Repository 1.309 (and Git-Repository-Plugin-Log 1.309) LICENSE100644001750001750 4371112236134762 16562 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310This software is copyright (c) 2013 by Philippe Bruhat (BooK). This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2013 by Philippe Bruhat (BooK). This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2013 by Philippe Bruhat (BooK). This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End dist.ini100644001750001750 175412236134762 17202 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310name = Git-Repository-Plugin-Log author = Philippe Bruhat (BooK) license = Perl_5 copyright_holder = Philippe Bruhat (BooK) ; copyright_year = 2010-2013 [PkgVersion] [@Filter] -bundle = @Basic -remove = Readme [PruneFiles] filename = setup match = \.patch$ match = mess/.* match = cover_db [AutoPrereqs] [Prereqs] Git::Repository = 1.309 [ReportVersions::Tiny] [MetaResources] repository.web = http://github.com/book/Git-Repository-Plugin-Log repository.url = http://github.com/book/Git-Repository-Plugin-Log.git repository.type = git bugtracker.web = http://rt.cpan.org/NoAuth/Bugs.html?Dist=Git-Repository-Plugin-Log bugtracker.mailto = bug-git-repository-plugin-log@rt.cpan.org [PodWeaver] [MetaTests] [PodSyntaxTests] [PodCoverageTests] [NextRelease] format = %v %{EEE MMM d yyyy}d [@Git] changelog = Changes commit_msg = Changes for version %v tag_format = v%v tag_message = %N v%v push_to = origin push_to = github [Git::NextVersion] META.yml100644001750001750 150412236134762 17000 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310--- abstract: 'Add a log() method to Git::Repository' author: - 'Philippe Bruhat (BooK) ' build_requires: Cwd: 0 File::Find: 0 File::Spec: 0 File::Temp: 0 Test::Git: 0 Test::More: 0.88 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300020, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Git-Repository-Plugin-Log requires: Carp: 0 Git::Repository: 1.309 Git::Repository::Command: 0 Git::Repository::Plugin: 0 Scalar::Util: 0 perl: 5.006 strict: 0 warnings: 0 resources: bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Git-Repository-Plugin-Log repository: http://github.com/book/Git-Repository-Plugin-Log.git version: 1.310 MANIFEST100644001750001750 54112236134762 16640 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310Changes LICENSE MANIFEST META.yml Makefile.PL README dist.ini lib/Git/Repository/Log.pm lib/Git/Repository/Log/Iterator.pm lib/Git/Repository/Plugin/Log.pm t/00-load.t t/000-report-versions-tiny.t t/30-log.t t/40-plugin-log.t t/41-multiline-log.t t/bundle.pl t/release-distmeta.t t/release-pod-coverage.t t/release-pod-syntax.t t/test.bundle weaver.ini weaver.ini100644001750001750 22212236134762 17475 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310[@CorePrep] [Name] [Version] [Generic / SYNOPSIS] [Generic / DESCRIPTION] [Leftovers] [Bugs] [Authors] [Generic / COPYRIGHT] [Generic / LICENSE] t000755001750001750 012236134762 15632 5ustar00bookbook000000000000Git-Repository-Plugin-Log-1.31030-log.t100644001750001750 1474112236134762 17207 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/tuse strict; use warnings; use Test::More; use Git::Repository::Log; # no need for git here my @tests = ( [ [ commit => '2bb91232215d1863c6b8cb3737d8d8ed952f0210', tree => '23a9197db125bb757e80462639cd7a2b288a9473', parent => 'd747608fb582710f1d6885e0a94c585024ae44bc', author => 'Philippe Bruhat (BooK) 1282408639 +0200', committer => 'Philippe Bruhat (BooK) 1282408639 +0200', message => " MANIFEST update\n", extra => << 'EXTRA', 'diff --git a/MANIFEST b/MANIFEST index 86a12a9..4766ee3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -14,5 +14,8 @@ t/10-new_fail.t t/11-create.t t/20-simple.t t/22-backward.t +t/25-mixins.t +t/Git/Repository/Mixin/Hello.pm +t/Git/Repository/Mixin/Hello2.pm t/pod-coverage.t t/pod.t EXTRA ] => { commit => '2bb91232215d1863c6b8cb3737d8d8ed952f0210', tree => '23a9197db125bb757e80462639cd7a2b288a9473', parent => ['d747608fb582710f1d6885e0a94c585024ae44bc'], author => 'Philippe Bruhat (BooK) 1282408639 +0200', author_gmtime => '1282408639', author_localtime => '1282415839', author_tz => '+0200', author_name => 'Philippe Bruhat (BooK)', author_email => 'book@cpan.org', committer => 'Philippe Bruhat (BooK) 1282408639 +0200', committer_name => 'Philippe Bruhat (BooK)', committer_email => 'book@cpan.org', committer_gmtime => '1282408639', committer_localtime => '1282415839', committer_tz => '+0200', raw_message => " MANIFEST update\n", message => "MANIFEST update\n", subject => "MANIFEST update", body => '', extra => << 'EXTRA', 'diff --git a/MANIFEST b/MANIFEST index 86a12a9..4766ee3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -14,5 +14,8 @@ t/10-new_fail.t t/11-create.t t/20-simple.t t/22-backward.t +t/25-mixins.t +t/Git/Repository/Mixin/Hello.pm +t/Git/Repository/Mixin/Hello2.pm t/pod-coverage.t t/pod.t EXTRA } ], [ [ commit => 'f4ceeb0b81da0ae70388340f41dd574db585778b', tree => '7a24e56ba5f15011e95dd397969000a87a141ba1', parent => '1c8f8d241bb94f4c10cc6639a23accd53b7ba93e', parent => '9adb8a6926b6a93a6aca057e6d01443f73464afa', author => 'Philippe Bruhat (BooK) 1282050772 -0200', committer => 'Philippe Bruhat (BooK) 1282050772 -0200', message => << 'MESSAGE', Merge branch 'master' into git-log Conflicts: lib/Git/Repository.pm MESSAGE extra => '', ] => { commit => 'f4ceeb0b81da0ae70388340f41dd574db585778b', tree => '7a24e56ba5f15011e95dd397969000a87a141ba1', parent => [ '1c8f8d241bb94f4c10cc6639a23accd53b7ba93e', '9adb8a6926b6a93a6aca057e6d01443f73464afa' ], author => 'Philippe Bruhat (BooK) 1282050772 -0200', author_gmtime => '1282050772', author_localtime => '1282043572', author_tz => '-0200', author_name => 'Philippe Bruhat (BooK)', author_email => 'book@cpan.org', committer => 'Philippe Bruhat (BooK) 1282050772 -0200', committer_name => 'Philippe Bruhat (BooK)', committer_email => 'book@cpan.org', committer_gmtime => '1282050772', committer_localtime => '1282043572', committer_tz => '-0200', raw_message => << 'MESSAGE', Merge branch 'master' into git-log Conflicts: lib/Git/Repository.pm MESSAGE message => << 'MESSAGE', Merge branch 'master' into git-log Conflicts: lib/Git/Repository.pm MESSAGE subject => q{Merge branch 'master' into git-log}, body => << 'BODY', Conflicts: lib/Git/Repository.pm BODY extra => '', } ], [ [ commit => '940ca54b6b3ac6a3c03349c8b4515b5536064068', tree => 'fb10bfa47f17e73b8575bbc8b9558453f987ea6f', parent => '3739c7e10ee6bc0b39c776bf43a86ee3f53f3d68', author => 'Aristotle Pagaltzis 1282387388 +0800', committer => 'Philippe Bruhat (BooK) 1282389828 +0800', message => " small POD copyedit\n", extra => '', ] => { commit => '940ca54b6b3ac6a3c03349c8b4515b5536064068', tree => 'fb10bfa47f17e73b8575bbc8b9558453f987ea6f', parent => ['3739c7e10ee6bc0b39c776bf43a86ee3f53f3d68'], author => 'Aristotle Pagaltzis 1282387388 +0800', author_name => 'Aristotle Pagaltzis', author_email => 'pagaltzis@gmx.de', author_gmtime => '1282387388', author_localtime => '1282416188', author_tz => '+0800', committer => 'Philippe Bruhat (BooK) 1282389828 +0800', committer_name => 'Philippe Bruhat (BooK)', committer_email => 'book@cpan.org', committer_gmtime => '1282389828', committer_localtime => '1282418628', committer_tz => '+0800', raw_message => " small POD copyedit\n", message => "small POD copyedit\n", subject => "small POD copyedit", body => '', extra => '', }, ] ); my @methods = qw( commit tree parent ); plan tests => 3 * @tests; for my $t (@tests) { my ( $args, $expected ) = @$t; my $got = Git::Repository::Log->new(@$args); isa_ok( $got, 'Git::Repository::Log' ); is_deeply( $got, $expected, "commit $args->[1]" ); my $method = shift @methods; if ( $method eq 'parent' ) { is_deeply( [ $got->$method ], $expected->{$method}, "$method accessor" ); } else { is( $got->$method, $expected->{$method}, "$method accessor" ); } } 00-load.t100644001750001750 66712236134762 17304 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/tuse strict; use warnings; use Test::More; use File::Find; my @modules; find( sub { push @modules, $File::Find::name if /\.pm$/ }, 'lib' ); plan tests => scalar @modules; @modules = reverse sort map { s!/!::!g; s/\.pm$//; s/^lib:://; $_ } @modules; # load in isolation local $ENV{PERL5LIB} = join $Config::Config{path_sep} || ';', @INC; for my $module (@modules) { `$^X -M$module -e1`; is( $? >> 8, 0, "perl -M$module -e1" ); } bundle.pl100644001750001750 3224712236134762 17630 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/t%commit = ( "0ae36f101c68fd82a5bb9845fdf99e3fc6ab369e" => { body => "", extra => "", parent => [ "9be9b53c65ebf7c4f9d6de843619fd0990fb8d43", "88df96b38e9861eab3af30a312d24a740f3defd2" ], subject => "Merge branch 'slave'", tree => "fa85af1dc631f3f8d977aafe0253b1d02eb2c4c7" }, "21a06f684ba48bdff19436074f991267c849afcf" => { body => "signed tag\n\n# gpg: Signature made Tue Nov 5 06:32:38 2013 CET using RSA key ID 7621C403\n# gpg: Good signature from \"Example Author \"\n", extra => "", mergetag => [ "object f7c18a39ec24778012af208988bc23e6f1f3a636\ntype commit\ntag v1.0.0\ntagger Example Committer 1383629558 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL2AAoJEOX2RRt2IcQDUBsIAKlseVblr9McHXa1Yt6k4pbr\nKfjwUEpVSpOoeTVCUbr5etrhFA7k7eUYVo0NtEyHZGpvKOHDPBvwjiQ2BWDXqGsA\nPXwGJEUQ/BV1vLoj2lF/VuZQ53Lr1JH49tjxDvC5jzVwLl5TTQVOm6zCS9GVmoT4\ninmDmQk6BKmFqFP4f2TxANXYuiOBKLPGKRdEEZ0PvodLhQEJ6tCIGjZjxx8qUH6e\ndcBj0DOQ/pdBKSls9NnWAsGhoDefILR1m3n1zd6aFBtIlhfT5HY4ZA9RQAjvXeL3\nU7LSjUPGoygsSUkISSrIDypGqlO1Dwt8bLP4gtrxu54D/YDQzp2lEXxMtY/297U=\n=tizV\n-----END PGP SIGNATURE-----" ], parent => [ "dd8437af8d1fa7c53de33db969ceceee8c1c153a", "f7c18a39ec24778012af208988bc23e6f1f3a636" ], subject => "Merge tag 'v1.0.0'", tree => "7b8f01341e59251bbf067b1001cdd12f44c36847" }, "3eee6394377f62106ddd207b68942676da1b18ea" => { body => "", extra => "", mergetag => [ "object 7fa20ca61711a0109d431b1a479e3091c8ac9317\ntype commit\ntag v1.0.1\ntagger Example Committer 1383629558 +0100\n\n\303\243\302\201\302\223\303\243\302\202\302\223\303\243\302\201\302\253\303\243\302\201\302\241\303\243\302\201\302\257\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL2AAoJEOX2RRt2IcQDVAcH/2gaHSXfEgOuvB5S66JWNTMT\n4rqAJkFzaWUgT8F/ofou5O958n5bTjla1YHn93Cm+JCrJk53ECZR1lH0u8H5tRQK\nAQbKO/5HCHh9vh8/G4gghL62a8BwBU5wGwujZdFjtJOmix/2/80QuP5dY7zB1p2j\n0g024ZOaDvv70YAbFQibzZNH/I4LQK0gB2NamVZmcrWI/YWH8LVdVJrzkGFMne/r\n5F5B+kOXZp7KDCdbToNMT2NG5KAT6nkyCWv6njcehiL85V73hpBLy/HD1FAHeGFD\nzru/CXmrEejKRXoz8F7QBx8z2uQ4PAZ0pyEX8aM5wtyQLWlPXmI5ZNM5hXFjLrw=\n=l4pk\n-----END PGP SIGNATURE-----" ], parent => [ "21a06f684ba48bdff19436074f991267c849afcf", "7fa20ca61711a0109d431b1a479e3091c8ac9317" ], subject => "dobr\303\275 den (cs)", tree => "7b8f01341e59251bbf067b1001cdd12f44c36847" }, "60e4317e8c82fe9cc14058a5cd82ae95da4160d3" => { body => "", extra => "", gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL3AAoJEOX2RRt2IcQDfooH/2lWSRzo93o9kEnRMo4qqjtC\nbVAQOOCXr6ZuqFGSMnqoc6Am8nz8lhf379aA3iwmDrbUuDfGb71CsajUa7hvYsTm\nPd65arkNW+iXQgqpXgop0z9sAeLC9NvzT3IxWaZK63HYzXLd/z2u55OOA3mpimJE\nidbMBiQH6EKs+x9BT7CZ8D03oiGnaGCVfmyB3Iu7Pdf+vtLER5D3JUaGWijtIPWS\nSara2Lc28CWrn6SnEdUaLX95nOGWA/cwmCILoVgrArECQSnb1XQTL47M7UX6P7Lb\nKuC4ASpofSYYlUmdGRQa6YX2Sdq1RPGB0fd5hMcUN0ChrcMPHeeRu9sIn0764xs=\n=hpCM\n-----END PGP SIGNATURE-----", mergetag => [ "object be8bb3e4c13f7c7b01d635d86999a87c8b6d87aa\ntype commit\ntag v1.0.3\ntagger Example Committer 1383629558 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL3AAoJEOX2RRt2IcQDKEgH/0H9PFgB6naV/hbHf9gASwdg\nPsBBhe6eIAyqorFWqibbhiq14C19KPWOAuK3y4PvYyVGCiSqA+EMShV09JnS8KLe\nfxrPgDfqWwMCmDpuy6xY8wZILlWxtdwMtJt5/Cc1anAkVBx0TrCwx500UYJdPuMK\nEUHPBWNrjzIF2IKhnZRrxaKXEDLvWytVIy5vUBPDrJwdEYDKZbVNSQgTPLVpJW8D\nj5iSC8h+9Jc4y0Hrs3mZ1FRngD+EVOUmQzxRk+UVyT4QkpI50BLoX0i56eoiMWM0\nZY1nEam29yRVZr/E7QOLiWnXrHyzMwYqTXAwnRtp4BFBN02g1oJzeylB/VpUOQg=\n=vxO9\n-----END PGP SIGNATURE-----" ], parent => [ "998cab1c95332c2967dc44b41425661af9c8dcbd", "be8bb3e4c13f7c7b01d635d86999a87c8b6d87aa" ], subject => "buen d\303\255a (es)", tree => "7b8f01341e59251bbf067b1001cdd12f44c36847" }, "6c23b41b247ce53abb5bfa06beaba8ec33eb1a3f" => { body => "# tag 'v1.1.0'\nsigned tag\n\n# gpg: Signature made Tue Nov 5 06:32:39 2013 CET using RSA key ID 7621C403\n# gpg: Good signature from \"Example Author \"\n\n# tag 'v1.0.1'\n\343\201\223\343\202\223\343\201\253\343\201\241\343\201\257\n\n# gpg: Signature made Tue Nov 5 06:32:38 2013 CET using RSA key ID 7621C403\n# gpg: Good signature from \"Example Author \"\n", extra => "", mergetag => [ "object 21a06f684ba48bdff19436074f991267c849afcf\ntype commit\ntag v1.1.0\ntagger Example Committer 1383629558 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL3AAoJEOX2RRt2IcQDq4AH/jwSqR2olbhr6gNZJPcbWEXV\np/OtrMgB+O8KRWL0At8a9VTbehLeSnRE36WpLgyUVAHpMDw+OB0A1rpS+Ajz/3N/\ntwbPHbO7xIflBZ9TotigGybV2gUpZkFQW9EpQBCpP+ZqLN8vviWogcxCsU2lnmdx\nc6UeBS/pU7TV08WltFuL7WsoA0oIypFD1Yj9nmAtSdlnn0fTlt8YC0h1mrMWWIaN\nBYejxlFQBL7nwg7pxHJl89UtXYiEMJN950skLyq4YX5qLvD1OIxdRtPfIPNLo1sC\n//WCSBGHyhzCP8YSgKFd2Ho0tvxxvR3nEmmrLktSIZmM7AhPuco7dUsakSYyXLA=\n=eqmq\n-----END PGP SIGNATURE-----", "object 7fa20ca61711a0109d431b1a479e3091c8ac9317\ntype commit\ntag v1.0.1\ntagger Example Committer 1383629558 +0100\n\n\343\201\223\343\202\223\343\201\253\343\201\241\343\201\257\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL2AAoJEOX2RRt2IcQDVAcH/2gaHSXfEgOuvB5S66JWNTMT\n4rqAJkFzaWUgT8F/ofou5O958n5bTjla1YHn93Cm+JCrJk53ECZR1lH0u8H5tRQK\nAQbKO/5HCHh9vh8/G4gghL62a8BwBU5wGwujZdFjtJOmix/2/80QuP5dY7zB1p2j\n0g024ZOaDvv70YAbFQibzZNH/I4LQK0gB2NamVZmcrWI/YWH8LVdVJrzkGFMne/r\n5F5B+kOXZp7KDCdbToNMT2NG5KAT6nkyCWv6njcehiL85V73hpBLy/HD1FAHeGFD\nzru/CXmrEejKRXoz8F7QBx8z2uQ4PAZ0pyEX8aM5wtyQLWlPXmI5ZNM5hXFjLrw=\n=l4pk\n-----END PGP SIGNATURE-----" ], parent => [ "0ae36f101c68fd82a5bb9845fdf99e3fc6ab369e", "21a06f684ba48bdff19436074f991267c849afcf", "7fa20ca61711a0109d431b1a479e3091c8ac9317" ], subject => "Merge tags 'v1.1.0' and 'v1.0.1' into mergetags", tree => "fa85af1dc631f3f8d977aafe0253b1d02eb2c4c7" }, "7fa20ca61711a0109d431b1a479e3091c8ac9317" => { body => "", extra => "", parent => [ "f7c18a39ec24778012af208988bc23e6f1f3a636" ], subject => "\343\201\223\343\202\223\343\201\253\343\201\241\343\201\257 (ja)", tree => "822aed1f11e71b48d14c899d209b0dca92a08ec8" }, "88df96b38e9861eab3af30a312d24a740f3defd2" => { body => "", extra => "", parent => [], subject => "empty tree", tree => "4b825dc642cb6eb9a060e54bf8d69288fbee4904" }, "998cab1c95332c2967dc44b41425661af9c8dcbd" => { body => "", extra => "", gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL3AAoJEOX2RRt2IcQD+rAH/1Z17+KdH6luVOkOWk1Xcoga\nWFHji9++oBDE6MeydFWfY3PPFDXYjcbnJEkFtTp1F5hzuRqyGGJVnPHAxp7dVDSO\njQ4WZBnfNYA4wyI0U+TuvrPOHUKSvdHuhleE33knLT4q6xxbIm+v8OcptXfx1x7m\ni3/MGYDuUALPg7HbwLHxDh9d8S69c9cyAm3TLQO4IcWWKSI278siIHD9Ex856XKB\nLDsvb5Xy704LM505HqamMozuFMooJz2KHPUoYm0zdBh85nQL+xFvwfDjpVsxsqxf\n5Y3gI+3mHs1twnynMdOIu0Lt4d2EY/hDUwmbdIgYvd+3KhxFOZpOwwZNbC2rykk=\n=UtOD\n-----END PGP SIGNATURE-----", mergetag => [ "object d47252b6857d8f8d5cbb531a5240358293d56e7e\ntype commit\ntag v1.0.2\ntagger Example Committer 1383629558 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL3AAoJEOX2RRt2IcQDsv4H/2uqrlUHDAmDfe3Dy3uysJEo\nSb9GVXI6G9GdCn5ZBKAXK83bjMTkRtI0viAXXUwCsga0AeKvysvhguDgFU2GLBxQ\n52K3mDlt0pKlSEEObTM1oRs7xE7B2c6SQ30JTfKCrN75H9Rldp6aCVaij1uDU8b5\nvKL5MprHmGfEgEUda0KJnandyGWaGKTovzKhnEooskMT/iyiNmjrohmIMarYiYoB\nzS+Ejo3BzAKRUij9+8j+SFRlFusIjBCBUUddmYgbWxQiDZqFn/vjrvQsUtlCKAsK\nTh+772Dq5G2aHgrAO8uBIJ6AddOJGBd2FjLClv24HrSllHufpCO8uEawbLh/NmM=\n=qrsZ\n-----END PGP SIGNATURE-----" ], parent => [ "3eee6394377f62106ddd207b68942676da1b18ea", "d47252b6857d8f8d5cbb531a5240358293d56e7e" ], subject => "bom dia", tree => "7b8f01341e59251bbf067b1001cdd12f44c36847" }, "9be9b53c65ebf7c4f9d6de843619fd0990fb8d43" => { body => "", extra => "", parent => [], subject => "hello (en)", tree => "fa85af1dc631f3f8d977aafe0253b1d02eb2c4c7" }, "9fe2fecbe3ffef3c66ba4f5cc43f716f6cc751d3" => { body => "", extra => "", parent => [ "0ae36f101c68fd82a5bb9845fdf99e3fc6ab369e" ], subject => "g\303\263\303\260ur dagur (is)", tree => "b090e309a779f2ea76260d10abd027b08fb36362" }, a284f510c8400eb59759afc725162214033096b1 => { body => "", extra => "", gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL4AAoJEOX2RRt2IcQD040H/3JzRf7Pxxcre3FG54FtI4IP\necNQetBwnedCLaBqSqez9I/Cr+3OWnYjwLL/0pviU16S+ziM0naEa9jkBdvSxOo1\nuJA+1QlSnioLJG6+tH7YqV260ElDFhjTHcAX8xXO1jAWsI4OfSkYll8cGYd1joQG\n5Uw39RVpcElAfbWCDNE4tl2BrBk3LHC2xnPxCkUOi1h4dxWjD1Obz6JIDUlwdZ5R\n9JndRYu4kBVdXDU+NPnIvPMzEFVcCf0ncGwc1KsHKRaTt1KILk5s68wOj6amd9/J\nVpE9JNemKQTHEtOLFoAunweGBlUgROyMNnLz91Ld8+WEOAzMr4dWgTgPylRNfI4=\n=WF0v\n-----END PGP SIGNATURE-----", mergetag => [ "object 21a06f684ba48bdff19436074f991267c849afcf\ntype commit\ntag v1.1.0\ntagger Example Committer 1383629558 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL3AAoJEOX2RRt2IcQDq4AH/jwSqR2olbhr6gNZJPcbWEXV\np/OtrMgB+O8KRWL0At8a9VTbehLeSnRE36WpLgyUVAHpMDw+OB0A1rpS+Ajz/3N/\ntwbPHbO7xIflBZ9TotigGybV2gUpZkFQW9EpQBCpP+ZqLN8vviWogcxCsU2lnmdx\nc6UeBS/pU7TV08WltFuL7WsoA0oIypFD1Yj9nmAtSdlnn0fTlt8YC0h1mrMWWIaN\nBYejxlFQBL7nwg7pxHJl89UtXYiEMJN950skLyq4YX5qLvD1OIxdRtPfIPNLo1sC\n//WCSBGHyhzCP8YSgKFd2Ho0tvxxvR3nEmmrLktSIZmM7AhPuco7dUsakSYyXLA=\n=eqmq\n-----END PGP SIGNATURE-----", "object d47252b6857d8f8d5cbb531a5240358293d56e7e\ntype commit\ntag v1.0.2\ntagger Example Committer 1383629558 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL3AAoJEOX2RRt2IcQDsv4H/2uqrlUHDAmDfe3Dy3uysJEo\nSb9GVXI6G9GdCn5ZBKAXK83bjMTkRtI0viAXXUwCsga0AeKvysvhguDgFU2GLBxQ\n52K3mDlt0pKlSEEObTM1oRs7xE7B2c6SQ30JTfKCrN75H9Rldp6aCVaij1uDU8b5\nvKL5MprHmGfEgEUda0KJnandyGWaGKTovzKhnEooskMT/iyiNmjrohmIMarYiYoB\nzS+Ejo3BzAKRUij9+8j+SFRlFusIjBCBUUddmYgbWxQiDZqFn/vjrvQsUtlCKAsK\nTh+772Dq5G2aHgrAO8uBIJ6AddOJGBd2FjLClv24HrSllHufpCO8uEawbLh/NmM=\n=qrsZ\n-----END PGP SIGNATURE-----" ], parent => [ "88df96b38e9861eab3af30a312d24a740f3defd2", "21a06f684ba48bdff19436074f991267c849afcf", "d47252b6857d8f8d5cbb531a5240358293d56e7e" ], subject => "buon giorno (it)", tree => "4b825dc642cb6eb9a060e54bf8d69288fbee4904" }, a8516d977b481a4d73dda9b75cad4bfe71012e81 => { body => "", extra => "", parent => [ "60e4317e8c82fe9cc14058a5cd82ae95da4160d3" ], subject => "add the README", tree => "3096e79fddf5e2f440df8401af0c478a683d9071" }, b9998a8d2c194fd5f64440dbb381ef54921b4a4a => { body => "", extra => "", parent => [ "0ae36f101c68fd82a5bb9845fdf99e3fc6ab369e" ], subject => "\343\201\223\343\202\223\343\201\253\343\201\241\343\201\257 (ja)", tree => "51827db31da3d816058b613f19c971e5c4fa6f16" }, be8bb3e4c13f7c7b01d635d86999a87c8b6d87aa => { body => "", extra => "", parent => [ "d47252b6857d8f8d5cbb531a5240358293d56e7e" ], subject => "", tree => "524a684865d9b37e0a7236df14ccde01501f063d" }, d47252b6857d8f8d5cbb531a5240358293d56e7e => { body => "", extra => "", gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL2AAoJEOX2RRt2IcQDErUIAIMAep/ltBrsqZ5Aoe9ByeN6\npF2qaISdQ7ygxuLBVnUCwzMjsSKC6H8l1z5NgWNr6zQy1dJ4c/oJsjqvp5AfC52L\nO024cSX0ahQbsaCz9NBEIYdrzgT3tLMzgp82jr8ZKvzAWI7TyoqJJ6L7NFOAHQXt\nkPuDbf1ll5f40A/Tvk12e6vD0yNCe8o5ihjJ93uep2FBfbb2K4QOcFzE0FIhCmoS\nhg0hZveE42W+j34d8DLzHwzVvGBh+sBIjRqBg0I8pc6/CzajngvCToWQAzYSJZr6\neY3w+5cXHwbPGELujrCk9xien8DF3H8ETC/49g2oncnEWssY/ROQ0Yn4PALDu/c=\n=BLwa\n-----END PGP SIGNATURE-----", parent => [ "7fa20ca61711a0109d431b1a479e3091c8ac9317" ], subject => "ol\303\241 (pt)", tree => "33a90fc1da2f84bfc394fa886a3d70ae534dc03f" }, dd8437af8d1fa7c53de33db969ceceee8c1c153a => { body => "", extra => "", gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJSeIL2AAoJEOX2RRt2IcQDITcH/02I4nMpkkZDkveN6W2FS+We\nEZGu/kukFNxsp/Q8SucicaNfsYJRdU9MNrakxufJOQN7WPTkRYlEG3DIRwJHpP0N\nAlz0zavY/J0qDAkgsmiF0OIie44ecpp+ghckCkFyijESda5RArMWxiaikFoBOpgP\nHYvkkzbv9NZvTxNvZF+eWoJFbxBE3N/2vNiADcrJ6gUdBQVQHj4d364lPEb/ZnIj\nH4XwcqA76NYL+0F09bAkx7BS0S3/alYyPe+SFok6xCL62dj7Yv4ocJtA5eDVFA/n\naNiEGTf1is8C2d2irJNt8+420pXOzGAtLaTaHXkMlpDD4MLxdIVxI6eTZXdOLCY=\n=1pdD\n-----END PGP SIGNATURE-----", parent => [ "b9998a8d2c194fd5f64440dbb381ef54921b4a4a" ], subject => "hej (da)", tree => "7b8f01341e59251bbf067b1001cdd12f44c36847" }, f7c18a39ec24778012af208988bc23e6f1f3a636 => { body => "", extra => "", parent => [ "9fe2fecbe3ffef3c66ba4f5cc43f716f6cc751d3" ], subject => "hall\303\263 (is)", tree => "1840015fc84bf133760c966eed4c1b4047ea657a" } ); Makefile.PL100644001750001750 247312236134762 17507 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310 use strict; use warnings; use 5.006; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Add a log() method to Git::Repository", "AUTHOR" => "Philippe Bruhat (BooK) ", "BUILD_REQUIRES" => { "Cwd" => 0, "File::Find" => 0, "File::Spec" => 0, "File::Temp" => 0, "Test::Git" => 0, "Test::More" => "0.88" }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Git-Repository-Plugin-Log", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "Git::Repository::Plugin::Log", "PREREQ_PM" => { "Carp" => 0, "Git::Repository" => "1.309", "Git::Repository::Command" => 0, "Git::Repository::Plugin" => 0, "Scalar::Util" => 0, "strict" => 0, "warnings" => 0 }, "VERSION" => "1.310", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); test.bundle100644001750001750 2747612236134762 20204 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/t# v2 git bundle be8bb3e4c13f7c7b01d635d86999a87c8b6d87aa refs/heads/encoding a8516d977b481a4d73dda9b75cad4bfe71012e81 refs/heads/master 6c23b41b247ce53abb5bfa06beaba8ec33eb1a3f refs/heads/mergetags a284f510c8400eb59759afc725162214033096b1 refs/heads/slave c94ccf8fa93829139fe17a476005d6cdbe5b96e0 refs/tags/empty 9d3f13c8aa226f675f44b59aea360551a76e6253 refs/tags/hello 5f33707ccb31ed7f056e654e307597f8ec04b64b refs/tags/v1.0.0 c797d622e2360f298f906086c177321f0ba77723 refs/tags/v1.0.1 670d44d7079491569590fde90d3d1409b0d84ef7 refs/tags/v1.0.2 57c77408641873895c781bd2f4462e5a58a80102 refs/tags/v1.0.3 2fdcef10f777001075f123b77eb1f878a490c262 refs/tags/v1.1.0 a8516d977b481a4d73dda9b75cad4bfe71012e81 HEAD PACK+xm 0 {wAfiSQi ƨ;̋o%T0*1HZEf| LQgZ K' W0=ԞIWq8ZShw̢ý5/H"o| O80]+A$FS;aS3I%uigt(Q,;A0fSnh`=dW-ܳgic4l iv;8pا T{xD}IH }'Fث37R[ͼ¾BUł$7R]uۀA36R?|\Op؉xg>zM!N6m|_OI/D3lL\NZkm'9\{/~5x*խ >^Ǎ>(g ]#FA1,CI7󧰰5@>-T6\<7[Nsq kxz#~|Oo}_w}g_ m`|PF!<1Zja*臣9Kxy*k0Rct"Eh/qRh;ҺCPF'PUt%`VȌ wns[\1=ȇYAvm?6iCwӾj׍+TCwim2S'!3ܨUGIO6| Ѭ$Y"ST7ŖjXvc4ղ-6/#Q ϒi"K*G69WS点ݗa<ؗE_,IO+=NFY uHi:CkI>I,);t o)U9f=#Ѱd?\^& 0^,6noh8wKuTcS obہq/GIKkctZ(Пg5;txn@ ʒ"Ug{\qu&.عvp&*O@'`,yG%B$*ĪWy9%,DH(BhX!&}Wxȸ"_a@1#QAi\ }y+J >Sj,!1YMB Ϥ?}%yWo6۷݇גƺ6!r\J_-G:ը[\Qv go\EPSLô ]Єx䚡K+$#>nYcJе jg7^+˰F|bMQK -эǷ")3\2`vYe>W[K- 2~6A5p11Ixڬ礝;5%.\I&>[Ui4+UAnY*+DcgU>i銚]+\ٲ:Mn φq6 I+[kyVn/Bg9nxX :$OAv VG vn͢Sp;byqࠓ *>4!QuTP܌u0KPUȐy 4_TBA>;~t*%ɟxmK 1}N"J$D ncFt^QU&f ^(Jڀ"s*g\>d5V*",9+P(xr&}~nlY縛3ohl ^0FkJݷwi۰ѧ5(umԋT/}OExK8[Ef*5m$JR16my`h,c,TOGue 'J#" *XDI Gi! BJ$E6A)\P˩H2JHҔR(E")1QiYVx(I rX"lt`㺭(hLJ>䧴?" "|oVZo^P>DE]AY\@4.-3ōpDO6/~pp{Y}i3p-|ۚiA0t"}Zw5 vߟꚦkfħ5%^,SMS_2F+&68)4o at"ef;g̼V{džOWcj4ɚ7#ttWAԯ=8g8ktr*1h^KסZQڨOrroq"35xDbC*crzsofԯlU;XƠ,PMIHgvq֚  ]?پƥ^92NLIW(XwE \_jU9'FjΌU{-Wzq m MYQBS5Gxgu: v_`G/` K |YM%A̻w7q[THPx̤[R`adbfhjndbbhlaibd`dhih`l116raԼ̼t̴ݬb.MN6o: ؘ/xmr@<R̰);!HhhX&͛DR}믫CTYce3PbFH1(BI+7@Ր"npa m}QBro''V$cYTCG`pSBFi'y~%1TQ' GU Iii;n]' Ϋ:-۩:cf@LfyYb~3|#*[ϻcmVY%91T,WugnreJa+ \`UBq̓V踕\xˎ8<݊< HK3``ٴF4^G;p< L( M3Y3l'ʼDäJ f,c&3}RS22u-,L-u ?(-RHILŚ\)Ӕ.xmKs0F -4Nҩ026~Adن`L}Ӻnrw|s]|]03TT LfYf* KrͰ)5edm[*`ڨ,@)EiJPETn7Ssdק;1O?YuHx-}:|I>ï$[$US]x B IZ/\^x}5@>GoYS~_x+8(ab\G| WDV`γF+zF-іIWY\OK#/FbmHKp-x% 47\E&VhʑbQ]NW!giFK./)l;pʅ_;%0I{!nYo}HGl[G~68Fdݼj]8br@fce> hb ta1N$L{F_ cO X̴GuuXgYp/X*XcX@FF*n~ p7+:ىٱq]4EBb>xV•zU>Hrx͎@&MJ/ 4900iE"bÀ(ˏʯ}6=z?k𘪩 E@i*"L(1 CʘkR6Љ;fc~vI. x5K 09ţ[Ai^!Ĕޖna؀jLƢREA$#yDJcY!I9׍FZeC-jNq5g*Nk .8gm?.'xmK@+X&BNeRi[!Aw_?Le:Sni%(J2(Ȳr0! OT%@a hzdFny$=cLiUY|ɿ˜=^(*cYؐl??N30 ALh_ n@qhnu@k: j׆͆B3HLdUUf$T: ݾV^"mI/}/ڟH>$-Pnܕi,|x ȟk17m <|{nTZNG|+1 ح"Pq\k,iV,=!ᄜd{-\Ͳ=lmc='XKtarWNrVL+YAjP $7 W 8HRfuCqvHb <ޏC MKr*{Ϸ`e$+Ρ*G/kM;2c(xmK@eQ Ц2Qm̮ Gιœ ,r(_$PvWJ_:.Ҥc' /DĀ LY]M;{#~^evesLY-н/?-}7G/+ ,f^xߞ?ۯͰ\vn٥e$X-7άG^WY@8'G}-QQHF ŷ@Bj[BXtJɚ$&3j.'-㱽qYwbnVYu~{W(#[|> AS8|M-)CxqTͽ|cl!YYqh~v[iP@ x(FN%&g?3\Gen,n1ޭv8JA:R^5tvgt 4%:\i\I֒oʙ35 3=et%_8'\:wWaiȝ}N{~dbsx_Ss'/'xmKo@+Xj\5U06!jg 9ޫ!+F,̗"fq\wW:+.6a=F}FӖ[jvҔvlCp5N*F-Xe\e[n>"jÍWĎ-@ǵ'xmI@+X&eEAT^* "kAD142*_7TvS9uV&2<A)1D%NSEA*Krj%SK̃ss!s3UmI3@ɯC;p"HX( r0yMR 80-qL,F5>98~('cw@s<ʹ}}@7 ! XX@ﺔњ>2Rn7NZvGmvʫ`CL.xkR|hnN[oo`>cgJZoϷ>Pv3;wV"hd/*A"D֗G%]ݱ 5%^պBK˺١J W "h!ja~r;7vc 8ԉiǒYcR'7ܠ tO3Mw_W)n }jz|u28Sn^80z/5 {-wȁ xx340031QHI+(a ÷=~ O}fܩx340031QrutuMa#Onhto{!Q=i)2(JI+(aNZ};+(ƛx340031QHI+(axRuhEjMLmYey+q x340031QHI+(a^3_bM_.i׸Jx340031QHI+(at|m7O]l  x340031QHI+(ahZ&J6ɆLK|/ qx340031QHI+(aNZ};+(ƛ5 x340031QHI+(a:e5KVmCx340031QHI+(a *(,௑^{*[ˊ 86xH8xK/- xVKoF W ziy?Pvo=X˙U$C_JcIC#1jX wm_ mg{[lR P5=f/S5Kc k k7LCOa`_ߛ=~! zv]{lhYWuf@nvdb; zS }|H:jhz}0>#( lncKر/lhj1}G#ƪ)T?8e@5=uyCt2{, H.Q;0SUs#;hv%;Emϰ2R=dF@Hۣb,GC,R&e/ɠY={~nIķ+MX }gݦ6d݆o 0vx} u"* !wG`wt=ĩUYҝħr~L~C H(% uBKc)7''gįBDV+9g]>hi s,aFF]B F p"xLJa ;y뗳4.Cz]l~e=l؅\^#xs&8$'RR')Ń5KObIs8 1+ y+]@K$)Hc%IQU7GCpH[[Ak%AJeUΑ(F90 *`u Erh( |^ IRDU IIJ4%gIխng=uliBpɨJlHh}IXΫ|8I<,q\)Vk3XRD n/`]b*"d}U6%Sd!*EtOld{:k oi8(!4/y(C;rMPB@SH @]mFbЊP2詹Y2۶c MQqRT+dMBIBq3qhreb %)2&ᜒ9wx:06jz S5B%XܵO9wbiڼ;I΋%g%#-ډ;%'$}('k]P9G-UO^9gҒ4xHB7xH9 ";xkd\)3xy >xK?"".7ux{8qǍ7.|ܸ [_ !%xW+K=վn@"լeI40-plugin-log.t100644001750001750 1116712236134762 20503 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/tuse strict; use warnings; use lib 't'; use Test::More; use Test::Git; use File::Temp qw( tempdir ); use File::Spec; use Cwd qw( cwd abs_path ); use Git::Repository; has_git('1.5.0.rc1'); my $version = Git::Repository->version; # clean up the environment delete @ENV{qw( GIT_DIR GIT_WORK_TREE )}; $ENV{LC_ALL} = 'C'; $ENV{GIT_AUTHOR_NAME} = 'Test Author'; $ENV{GIT_AUTHOR_EMAIL} = 'test.author@example.com'; $ENV{GIT_COMMITTER_NAME} = 'Test Committer'; $ENV{GIT_COMMITTER_EMAIL} = 'test.committer@example.com'; plan tests => my $tests; # first create a new empty repository my $r = test_repository; my $dir = $r->work_tree; my $gitdir = $r->git_dir; # extra options to the commit command: # - skip commit hooks that might be included in the template my @opts = qw( --no-verify ); # some test data my %commit = ( 1 => { tree => 'df2b8fc99e1c1d4dbc0a854d9f72157f1d6ea078', parent => [], subject => 'empty file', body => '', extra => '', }, 2 => { tree => '6820ead72140bd33a7a821965a05f9a1e89bf3c8', parent => [], subject => 'one line', body => "of data\n", extra => '', }, ); sub check_commit { my ( $id, $log, %more ) = @_; my $commit = { %{ $commit{$id} }, %more }; is( $log->tree, $commit->{tree}, "commit $id tree" ); is_deeply( [ $log->parent ], $commit->{parent}, "commit $id parent" ); is( $log->subject, $commit->{subject}, "commit $id subject" ); is( $log->body, $commit->{body}, "commit $id body" ); is( $log->extra, $commit->{extra}, "commit $id extra" ); } local $/ = chr rand 128; # no log method yet BEGIN { $tests += 3 } ok( !eval { $r->log('-1') }, 'no log() method' ); # load the log method use_ok( 'Git::Repository', 'Log' ); ok( eval { $r->log('-1') }, 'log() method exists now' ); # create an empty file and commit it BEGIN { $tests += 2 } my $file = File::Spec->catfile( $dir, 'file' ); do { open my $fh, '>', $file; }; $r->run( add => 'file' ); $r->run( commit => @opts, '-m', $commit{1}{subject} ); my @log = $r->log(); is( scalar @log, 1, '1 commit' ); isa_ok( $_, 'Git::Repository::Log' ) for @log; # check some log details BEGIN { $tests += 5 } check_commit( 1 => $log[0] ); push @{ $commit{2}{parent} }, $log[0]->commit; # create another commit BEGIN { $tests += 3 } do { open my $fh, '>', $file; print $fh 'line 1'; }; $r->run( add => 'file' ); $r->run( commit => @opts, '-m', "$commit{2}{subject}\n\n$commit{2}{body}" ); @log = $r->log(); is( scalar @log, 2, '2 commits' ); isa_ok( $_, 'Git::Repository::Log' ) for @log; # check some log details BEGIN { $tests += 5 } check_commit( 2 => $log[0] ); # try as a class method BEGIN { $tests += 8 } my $home = cwd; chdir $dir; @log = Git::Repository->log(); is( scalar @log, 2, '2 commits' ); isa_ok( $_, 'Git::Repository::Log' ) for @log; check_commit( 2 => $log[0] ); chdir $home; # try a command that fails (fatal) BEGIN { $tests += 2 } ok( !eval { @log = $r->log('zlonk') }, q{log('zlonk') failed} ); like( $@, qr/^fatal: ambiguous argument 'zlonk': unknown revision or path not in/, 'unknown revision or path' ); # try a command that returns a git error (usage) BEGIN { $tests += 2 } ok( !eval { @log = $r->log('--bam') }, q{log('--bam') failed} ); like( $@, qr/^fatal: unrecognized argument: --bam at/, 'unknown revision or path' ); # various options combinations my @options; BEGIN { @options = ( [ [qw( -p -- file )], [ <<'DIFF', << 'DIFF'] ], diff --git a/file b/file index e69de29..dcf168c 100644 --- a/file +++ b/file @@ -0,0 +1 @@ +line 1 \ No newline at end of file DIFF diff --git a/file b/file new file mode 100644 index 0000000..e69de29 DIFF [ [qw( file )], [ '', '' ] ], [ [qw( --decorate file )], [ '', '' ], '1.5.2.rc0' ], [ [qw( --pretty=raw )], [ '', '' ] ], ); $tests += 13 * @options; } for my $o (@options) { my ( $args, $extra, $minver ) = @$o; SKIP: { skip "git log @$args needs $minver, we only have $version", 13 if $minver && Git::Repository->version_lt($minver); @log = $r->log(@$args); is( scalar @log, 2, "2 commits for @$args" ); isa_ok( $_, 'Git::Repository::Log' ) for @log; check_commit( 2 => $log[0], extra => $extra->[0] ); check_commit( 1 => $log[1], extra => $extra->[1] ); } } my @badopts; BEGIN { @badopts = ( [qw( --pretty=oneline )], [qw( --graph )], ); $tests += 2 * @badopts; } for my $badopt (@badopts) { ok( !eval { $r->log(@$badopt) }, "bad options: @$badopt" ); like( $@, qr/^log\(\) cannot parse @$badopt/, '.. expected error' ); } 41-multiline-log.t100644001750001750 277412236134762 21174 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/tuse strict; use warnings; use Test::More; use File::Spec; use Cwd qw( cwd ); use Test::Git; use Git::Repository 'Log'; has_git('1.5.1'); # test data { our %commit; do File::Spec->catfile( 't', 'bundle.pl' ); sub check_commit { my ($log) = @_; my $id = $log->commit; return if !exists $commit{$id}; my $commit = $commit{$id}; is( $log->tree, $commit->{tree}, "commit $id tree" ); is_deeply( [ $log->parent ], $commit->{parent}, "commit $id parent" ); is( $log->subject, $commit->{subject}, "commit $id subject" ); is( $log->body, $commit->{body}, "commit $id body" ); is( $log->extra, $commit->{extra}, "commit $id extra" ); is( $log->gpgsig, $commit->{gpgsig}, "commit $id gpgsig" ); is_deeply( [ $log->mergetag ], $commit->{mergetag} || [], "commit $id mergetag" ); } plan tests => 7 * scalar keys %commit; } # clean up the environment delete @ENV{qw( GIT_DIR GIT_WORK_TREE )}; $ENV{LC_ALL} = 'C'; # git log will output utf-8 # first create a new empty repository my $r = test_repository; # now load the bundle my @refs = $r->run( bundle => 'unbundle', File::Spec->catfile( cwd(), qw( t test.bundle ) ) ); # and update the refs for my $line (@refs) { my ( $sha1, $ref ) = split / /, $line; $r->run( 'update-ref', $ref => $sha1 ); } # test! my $iter = $r->log('--all'); while ( my $log = $iter->next ) { check_commit($log); } release-distmeta.t100644001750001750 45512236134762 21373 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); release-pod-syntax.t100644001750001750 45012236134762 21662 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); release-pod-coverage.t100644001750001750 76512236134762 22140 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Repository000755001750001750 012236134762 21037 5ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/lib/GitLog.pm100644001750001750 1143112236134762 22276 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/lib/Git/Repositorypackage Git::Repository::Log; { $Git::Repository::Log::VERSION = '1.310'; } use strict; use warnings; use 5.006; # a few simple accessors for my $attr ( qw( commit tree author author_name author_email committer committer_name committer_email author_localtime author_tz author_gmtime committer_localtime committer_tz committer_gmtime raw_message message subject body gpgsig extra ) ) { no strict 'refs'; *$attr = sub { return $_[0]{$attr} }; } for my $attr (qw( parent mergetag )) { no strict 'refs'; *$attr = sub { return @{ $_[0]{$attr} || [] } }; } sub new { my ( $class, @args ) = @_; my $self = bless { parent => [] }, $class; # pick up key/values from the list while ( my ( $key, $value ) = splice @args, 0, 2 ) { if ( $key =~ /^(?:parent|mergetag)$/ ) { push @{ $self->{$key} }, $value; } else { $self->{$key} = $value; } } # special case $self->{commit} = (split /\s/, $self->{commit} )[0]; # compute other keys $self->{raw_message} = $self->{message}; $self->{message} =~ s/^ //gm; @{$self}{qw( subject body )} = ( split( /\n/m, $self->{message}, 2 ), '', '' ); $self->{body} =~ s/\A\s//gm; # author and committer details for my $who (qw( author committer )) { $self->{$who} =~ /^(.*) <(.*)> (.*) (([-+])(..)(..))$/; my @keys = ( "${who}_name", "${who}_email", "${who}_gmtime", "${who}_tz" ); @{$self}{@keys} = ( $1, $2, $3, $4 ); $self->{"${who}_localtime"} = $self->{"${who}_gmtime"} + ( $5 eq '-' ? -1 : 1 ) * ( $6 * 3600 + $7 * 60 ); } return $self; } 1; # ABSTRACT: Class representing git log data __END__ =pod =head1 NAME Git::Repository::Log - Class representing git log data =head1 VERSION version 1.310 =head1 SYNOPSIS # 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; =head1 DESCRIPTION L is a class whose instances reprensent log items from a B stream. =head1 CONSTRUCTOR This method shouldn't be used directly. L should be the preferred way to create L objects. =head2 new( @args ) Create a new L instance, using the list of key/values passed as parameters. The supported keys are (from the output of C): =over 4 =item commit The commit id (ignoring the extra information added by I<--decorate>). =item tree The tree id. =item parent The parent list, separated by spaces. =item author The author information. =item committer The committer information. =item message The log message (including the 4-space indent normally output by B). =item gpgsig The commit signature. =item mergetag The mergetag information. =item extra Any extra text that might be added by extra options passed to B. =back Note that since C does not provide the C header (and provides the message properly decoded), this information will not be available via L. =head1 ACCESSORS The following accessors methods are recognized. They all return scalars, except for C, which returns a list. =head2 Commit information =over 4 =item commit =item tree =item parent =back =head2 Author and committer information =over 4 =item author =item committer The original author/committer line =item author_name =item committer_name =item author_email =item committer_email =back =head2 Date information =over 4 =item author_gmtime =item committer_gmtime =item author_localtime =item committer_localtime =item author_tz =item committer_tz =back =head2 Log information =over 4 =item raw_message The log message with the 4-space indent output by B. =item message The unindented version of the log message. =item subject =item body =back =head2 Signature-related information =over 4 =item gpgsig =item mergetag =back =head2 Extra information =over 4 =item extra =back =head1 BUGS 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 bug-git-repository-plugin-log@rt.cpan.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. =head1 AUTHOR Philippe Bruhat (BooK) =head1 COPYRIGHT Copyright 2010-2013 Philippe Bruhat (BooK), all rights reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut 000-report-versions-tiny.t100644001750001750 507212236134762 22622 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/tuse strict; use warnings; use Test::More 0.88; # This is a relatively nice way to avoid Test::NoWarnings breaking our # expectations by adding extra tests, without using no_plan. It also helps # avoid any other test module that feels introducing random tests, or even # test plans, is a nice idea. our $success = 0; END { $success && done_testing; } # List our own version used to generate this my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.08\n"; eval { # no excuses! # report our Perl details my $want = '5.006'; $v .= "perl: $] (wanted $want) on $^O from $^X\n\n"; }; defined($@) and diag("$@"); # Now, our module version dependencies: sub pmver { my ($module, $wanted) = @_; $wanted = " (want $wanted)"; my $pmver; eval "require $module;"; if ($@) { if ($@ =~ m/Can't locate .* in \@INC/) { $pmver = 'module not found.'; } else { diag("${module}: $@"); $pmver = 'died during require.'; } } else { my $version; eval { $version = $module->VERSION; }; if ($@) { diag("${module}: $@"); $pmver = 'died during VERSION check.'; } elsif (defined $version) { $pmver = "$version"; } else { $pmver = ''; } } # So, we should be good, right? return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); } eval { $v .= pmver('Carp','any version') }; eval { $v .= pmver('Cwd','any version') }; eval { $v .= pmver('ExtUtils::MakeMaker','6.30') }; eval { $v .= pmver('File::Find','any version') }; eval { $v .= pmver('File::Spec','any version') }; eval { $v .= pmver('File::Temp','any version') }; eval { $v .= pmver('Git::Repository','1.309') }; eval { $v .= pmver('Git::Repository::Command','any version') }; eval { $v .= pmver('Git::Repository::Plugin','any version') }; eval { $v .= pmver('Scalar::Util','any version') }; eval { $v .= pmver('Test::Git','any version') }; eval { $v .= pmver('Test::More','0.88') }; eval { $v .= pmver('strict','any version') }; eval { $v .= pmver('version','0.9901') }; eval { $v .= pmver('warnings','any version') }; # All done. $v .= <<'EOT'; Thanks for using my code. I hope it works for you. If not, please try and include this output in the bug report. That will help me reproduce the issue and solve your problem. EOT diag($v); ok(1, "we really didn't test anything, just reporting data"); $success = 1; # Work around another nasty module on CPAN. :/ no warnings 'once'; $Template::Test::NO_FLUSH = 1; exit 0; Plugin000755001750001750 012236134762 22275 5ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/lib/Git/RepositoryLog.pm100644001750001750 502712236134762 23520 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/lib/Git/Repository/Pluginpackage Git::Repository::Plugin::Log; { $Git::Repository::Plugin::Log::VERSION = '1.310'; } use warnings; use strict; use 5.006; use Git::Repository::Plugin; our @ISA = qw( Git::Repository::Plugin ); sub _keywords { qw( log ) } use Git::Repository::Log::Iterator; sub log { # skip the invocant when invoked as a class method shift if !ref $_[0]; # get the iterator my $iter = Git::Repository::Log::Iterator->new(@_); # scalar context: return the iterator return $iter if !wantarray; # list context: return all Git::Repository::Log objects my @logs; while ( my $log = $iter->next ) { push @logs, $log; } return @logs; } 1; # ABSTRACT: Add a log() method to Git::Repository __END__ =pod =head1 NAME Git::Repository::Plugin::Log - Add a log() method to Git::Repository =head1 VERSION version 1.310 =head1 SYNOPSIS # load the plugin use Git::Repository 'Log'; my $r = Git::Repository->new(); # get all log objects my @logs = $r->log(qw( --since=yesterday )); # get an iterator my $iter = $r->log(qw( --since=yesterday )); while ( my $log = $iter->next() ) { ...; } =head1 DESCRIPTION This module adds a new method to L. =head1 METHOD =head2 log( @args ) Run C with the given arguments. In scalar context, returns a L object, which can return L objects on demand. In list context, returns the full list L objects. Note that this can be very memory-intensive. See L's documentation for details about how parameters are handled. =head1 ACKNOWLEDGEMENTS Many thanks to Aristotle Pagaltzis who requested a C method in the first place, and for very interesting conversations on the topic. =head1 SEE ALSO L, L, L. =head1 BUGS 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 bug-git-repository-plugin-log@rt.cpan.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. =head1 AUTHOR Philippe Bruhat (BooK) =head1 COPYRIGHT Copyright 2010-2013 Philippe Bruhat (BooK), all rights reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Log000755001750001750 012236134762 21560 5ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/lib/Git/RepositoryIterator.pm100644001750001750 1022212236134762 24064 0ustar00bookbook000000000000Git-Repository-Plugin-Log-1.310/lib/Git/Repository/Logpackage Git::Repository::Log::Iterator; { $Git::Repository::Log::Iterator::VERSION = '1.310'; } use strict; use warnings; use 5.006; use Carp; use Scalar::Util qw( blessed ); use Git::Repository; use Git::Repository::Command; use Git::Repository::Log; sub new { my ( $class, @cmd ) = @_; # pick up unsupported log options my @badopts = do { my $options = 1; grep {/^--(?:pretty=(?!raw).*|graph)$/} grep { $options = 0 if $_ eq '--'; $options } @cmd; }; croak "log() cannot parse @badopts. " . 'Use run( log => ... ) to parse the output yourself' if @badopts; # note: there is no --color option to git log before 1.5.3.3 my ($r) = grep blessed $_ && $_->isa('Git::Repository'), @cmd; $r ||= 'Git::Repository'; # no Git::Repository object given unshift @cmd, '--no-color' if $r->version_ge('1.5.3.3'); # enforce the format @cmd = ( 'log', '--pretty=raw', @cmd ); # run the command (@cmd may hold a Git::Repository instance) bless { cmd => Git::Repository::Command->new(@cmd) }, $class; } sub next { my ($self) = @_; my $fh = $self->{cmd}->stdout; # get records my @records = defined $self->{record} ? ( delete $self->{record} ) : (); { local $/ = "\n\n"; while (<$fh>) { $self->{record} = $_, last if /\Acommit / && @records; push @records, $_; } } # EOF return $self->{cmd}->final_output() if !@records; # the first two records are always the same, with --pretty=raw local $/ = "\n"; my ( $header, $message, $extra ) = ( @records, '', '' ); chomp $header; my @headers = map { chomp; split / /, $_, 2 } split /^(?=\S)/m, $header; s/\n /\n/g for @headers; chomp( $message, $extra ) if exists $self->{record}; # create the log object return Git::Repository::Log->new( @headers, message => $message, extra => $extra, ); } 1; # ABSTRACT: Split a git log stream into records __END__ =pod =head1 NAME Git::Repository::Log::Iterator - Split a git log stream into records =head1 VERSION version 1.310 =head1 SYNOPSIS use Git::Repository::Log::Iterator; # use a default Git::Repository context my $iter = Git::Repository::Log::Iterator->new('HEAD~10..'); # or provide an existing instance my $iter = Git::Repository::Log::Iterator->new( $r, 'HEAD~10..' ); # get the next log record while ( my $log = $iter->next ) { ...; } =head1 DESCRIPTION L initiates a B command from a list of paramaters and parses its output to produce L objects represening each log item. =head1 METHODS =head2 new( @args ) Create a new B stream from the parameter list in C<@args> and return a iterator on it. C will happily accept any parameters, but note that L expects the output to look like that of C<--pretty=raw>, and so will force the the C<--pretty> option (in case C is defined in the Git configuration). It will also forcibly remove colored output (using C<--color=never>). Extra output (like patches) will be stored in the C parameter of the L object. Decorations will be lost. When unsupported options are recognized in the parameter list, C will C with a message advising to use C<< run( 'log' => ... ) >> to parse the output yourself. =head2 next() Return the next log item as a L object, or nothing if the stream has ended. =head1 BUGS 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 bug-git-repository-plugin-log@rt.cpan.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. =head1 AUTHOR Philippe Bruhat (BooK) =head1 COPYRIGHT Copyright 2010-2013 Philippe Bruhat (BooK), all rights reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut