Git::R...y::Log(3pm)
β¨ Git::Repository::Log β NAME β¨
ok so bestie, Git::Repository::Log is a whole class that represents git log data π like, each instance is one lil log item, periodt.
(also it lives in the User Contributed Perl Documentation section of the manual, iykyk π«Ά)
πΈ 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;
no cap, that's literally it. three lines and you're the main character π
π¦ DESCRIPTION π¦
Git::Repository::Log is a class whose instances represent log items from a git log stream. one instance = one log item. that's the vibe π
π CONSTRUCTOR π
β οΈ okay so real talk: this method shouldn't be used directly.Git::Repository::Log::Iteratorshould be the preferred way to createGit::Repository::Logobjects. like, let the iterator do the work, bestie π«Ά
new
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):
commitβ The commit id (ignoring the extra information added by--decorate).treeβ The tree id.parentβ The parent list, separated by spaces.authorβ The author information.committerβ The committer information.messageβ The log message (including the 4-space indent normally output by git log).gpgsigβ The commit signature.mergetagβ The mergetag information.diff_fromβ The commit from which the diff was taken. This is the extrafrominformation on the commit header that is added by git when the log contains a diff (using the-por--name-statusoption). In this case,git logmay show the same commit several times. π΅βπ« (yeah, same commit, multiple times, it's giving dΓ©jΓ vu)extraβ Any extra text that might be added by extra options passed to git log (e.g.-por--name-status).
π Note that sincegit tag --pretty=rawdoes not provide theencodingheader (and provides the message properly decoded), this information will not be available viaGit::Repository::Plugin::Log. so don't go looking for it, bestie, it's simply not there π
π ACCESSORS π
The following accessors methods are recognized. They all return scalars, except for parent(), which returns a list. (yes, one of them is the β¨specialβ¨ one that gives you a whole list π)
Commit information
committreeparent
Author and committer information
authorcommitterβ The original author/committer lineauthor_namecommitter_nameauthor_emailcommitter_email
Date information
author_gmtimecommitter_gmtimeauthor_localtimecommitter_localtimeauthor_tzcommitter_tz
Log information
raw_messageβ The log message with the 4-space indent output by git log.messageβ The unindented version of the log message. (the glow-up version β¨)subjectbody
Signature-related information
gpgsigmergetag
Extra information
extra
π COPYRIGHT π
Copyright 2010-2016 Philippe Bruhat (BooK), all rights reserved.
π LICENSE π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ok that's the whole page, you ate it, no crumbs πβ¨ this was built with perl v5.34.0, dated 2022-06-14, and it's filed under Git::R...y::Log(3pm) β go forth and log things, bestie πππ¦
π¦ where this page comes from
- debian bookworm: libgit-repository-plugin-log-perl 1.314-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgit-repository-plugin-log-perl 1.314-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgit-repository-plugin-log-perl 1.314-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgit-repository-plugin-log-perl 1.314-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgit-repository-plugin-log-perl 1.314-2 Β· 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