NAME
Git::Raw::Walker - Git revwalker class
VERSION
version 0.31
SYNOPSIS
use Git::Raw;
# open the Git repository at $path
my $repo = Git::Raw::Repository -> open($path);
# create a new walker
my $log = $repo -> walker;
# push the head of the repository
$log -> push_head;
# print all commit messages
while (my $commit = $log -> next) {
say $commit -> message;
}
DESCRIPTION
A Git::Raw::Walker
represents a graph walker used to walk through the repository's revisions (sort of like git log
).
WARNING: The API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog).
METHODS
create( $repo )
Create a new revision walker.
push( $commit )
Push a Git::Raw::Commit to the list of commits to be used as roots when starting a revision walk.
push_glob( $glob )
Push references by $glob
to the list of commits to be used as roots when starting a revision walk.
push_ref( $name )
Push a reference by $name
to the list of commits to be used as roots when starting a revision walk.
push_head( )
Push HEAD of the repository to the list of commits to be used as roots when starting a revision walk.
hide( $commit )
Hide a Git::Raw::Commit and its ancestors from the walker.
hide_glob( $glob )
Hide references by $glob
and all ancestors from the walker.
hide_ref( $name )
Hide a reference by $name
and its ancestors from the walker.
hide_head( )
Hide HEAD of the repository and its ancestors from the walker.
next( )
Retrieve the next commit from the revision walk.
reset( )
Reset the revision walker (this is done automatically at the end of a walk).
AUTHOR
Alessandro Ghedini <alexbio@cpan.org>
LICENSE AND COPYRIGHT
Copyright 2012 Alessandro Ghedini.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.