Git::R...y::Log(3pm)

πŸ“¦
version 1.314 Β· 2 versions
  • 1.314 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.314 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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::Iterator should be the preferred way to create Git::Repository::Log objects. 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 extra from information on the commit header that is added by git when the log contains a diff (using the -p or --name-status option). In this case, git log may 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. -p or --name-status).
πŸ“Œ 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. 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

  • commit
  • tree
  • parent

Author and committer information

  • author
  • committer β€” The original author/committer line
  • author_name
  • committer_name
  • author_email
  • committer_email

Date information

  • author_gmtime
  • committer_gmtime
  • author_localtime
  • committer_localtime
  • author_tz
  • committer_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 ✨)
  • subject
  • body
  • gpgsig
  • mergetag

Extra information

  • extra

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