Git::Raw::Walker(3pm)
π Git::Raw::Walker β the revwalker class, bestie π
Okay so real talk: this is Git::Raw::Walker, the revwalker situation from the Git::Raw family of Perl modules. It's giving "git log but make it an object" energy and honestly? iconic. β¨
Version: 0.90 π
π 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;
}
Likeβ¦ that's it. That's the whole vibe. You open a repo, you get a walker, you push HEAD, you loop. Slay. π«Ά
π¦ DESCRIPTION π¦
A Git::Raw::Walker is literally a graph walker β it walks through your repository's revisions. Think of it like git log, but you're the one holding the aux cord. π§
β οΈ WARNING: The API of this module is unstable and may change without warning. Any change will be appropriately documented in the changelog, so like, don't say nobody told you. π
π METHODS π
create( $repo )
Create a new revision walker. Fresh out of the box, no notes. β¨
sorting( \@order )
Change the sorting mode used when iterating through the repository's contents. The values for @order can be one or more of these lil guys:
"none"β sorts the repository contents in no particular ordering. That means the sorting is arbitrary, implementation-specific, and subject to change at any time. This is the default. Lowkey chaos, but okay. π"topological"β sorts the repository contents in topological order (parents before children). This mode can be combined with time sorting. Family tree behavior, we love to see it. πΈ"time"β sorts the repository contents by commit time. This mode can be combined with topological sorting. β°"reverse"β iterates through the repository contents in reverse order. This mode can be combined with any of the above. π
push( $commit )
Push a Git::Raw::Commit onto the list of commits that get used as roots when starting a revision walk. It's the starting lineup. π
push_glob( $glob )
Push references matching $glob onto the list of commits used as roots when starting a revision walk.
push_ref( $name )
Push a reference by $name onto the list of commits used as roots when starting a revision walk.
push_head( )
Push HEAD of the repository onto the list of commits used as roots when starting a revision walk. Main character energy, periodt. π
push_range( $start, $end )
Push and hide the respective endpoints of the given range. Both $start and $end should be "commitish" β meaning it should be a Git::Raw::Commit or Git::Raw::Reference object, or alternatively a commit id or a commit id prefix.
push_range( $range )
Push and hide the respective endpoints of the given range. $range should be of the form "start_commit_id..end_commit_id". The two-dot girlies know. π
hide( $commit )
Hide a Git::Raw::Commit and its ancestors from the walker. Gone. Not invited to the party. π«
hide_glob( $glob )
Hide references matching $glob and all their 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( )
Grab the next commit from the revision walk. Returns a Git::Raw::Commit object, or undef if there are no commits left. So like, check your return value bestie. π
all( )
Grab all the commits. Returns a list of Git::Raw::Commit objects. The full dump, no skipping. π¦
reset( )
Reset the revision walker. And btw this happens automatically at the end of a walk, so it's already doing the work for you. π§
β¨ AUTHOR β¨
Alessandro Ghedini <alexbio@cpan.org> β thank you for the module king π«‘
π 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.
and that's the whole page, bestie!! π This masterpiece was brought to you by perl v5.42.3, dated 2026-08-19, and documented as Git::Raw::Walker(3pm). Go walk some revisions. π¦β¨ no cap.
π¦ where this page comes from
- ubuntu stonking: libgit-raw-perl 0.90+ds-3build3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms