Git::R...ference(3pm)
π Git::Raw::Reference β the manual, but make it bestie π
okay so welcome to the Git::Raw::Reference page, part of the User Contributed Perl Documentation (that's the 3pm section, iykyk). Grab a boba, we're learning about git refs π§β¨
β¨ NAME β¨
Git::Raw::Reference β it's the git reference class, babes π
πΈ VERSION πΈ
version 0.90 π
π¦ DESCRIPTION π¦
A Git::Raw::Reference represents a Git reference. that's the whole vibe. a ref. a little pointer with a name. iconic behavior honestly π
β οΈ 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 get too attached to the exact shape of things, bestie π it's giving "we'll text you if anything changes"
π METHODS π
annotated_commit( )
Create a Git::Raw::AnnotatedCommit from the reference. yes queen, make it annotated β¨
lookup( $name, $repo )
Retrieve the reference with name $name in $repo. go find it, it's right there π«Ά
create( $name, $repo, $object [, $force, $symbolic] )
Creates and returns a new reference named $name in $repo, pointing to $object. building a ref from scratch, we love a creation story π
$objectcan be aGit::Raw::Blob,Git::Raw::Commit, or aGit::Raw::Treeobject. those are your options, no cap πΈ- if
$forceis a truthy value, any existing reference is overwritten. bold. dramatic. slay π - if
$forceis falsy (this is the default, btw), and a reference named$namealready exists, an error is thrown. so likeβ¦ it will absolutely yell at you π¨ - if
$symbolicis a truthy value, then a symbolic reference is created β¨ - if
$symbolicis falsy (also the default), then a direct reference is created π― - if
$symbolicis a truthy value, then$objectcan be aGit::Raw::Referenceor a string. yes, a string. fr fr π₯
delete( )
Delete the reference.
π« do not access the Git::Raw::Reference object afterwards. it's gone. deceased. not coming back. bestie is not okay π
name( )
Retrieve the name of the reference. just the name, nothing extra, we're being efficient π
shorthand( )
Get the reference's short name. This will transform the reference name into a "human-readable" version. If no shortname is appropriate, it will return the full name.
basically: it tries to be cute and casual, and if it can't, it just gives you the whole government name π
type( )
Retrieve the type of the reference. Can be either "direct" or "symbolic". pick a lane bestie β¨
target( [$new_target] )
Retrieve the target of the reference. If the $new_target parameter β of type Git::Raw::Reference β is passed in, the reference will be changed to point to it. so you can read it or redirect it, versatile queen π
β οΈ Note that updating the target will invalidate all existing handles to the reference. every old handle? invalidated. gone. rip π
This function returns either an object (Git::Raw::Blob, Git::Raw::Commit, Git::Raw::Tag or Git::Raw::Tree) for direct references, or another reference for symbolic references. two very different energy readings, honestly π
peel( $type )
Recursively peel the reference until an object of the specified $type is found. Valid values for $type include: "commit", "tree" or "tag".
peel it like an orange until you hit the layer you actually wanted πβ¨
reflog( )
Retrieve the Git::Raw::Reflog of the reference. Shortcut for Git::Raw::Reflog->open(). a little shortcut, a lil convenience moment π
owner( )
Retrieve the Git::Raw::Repository owning the reference. who's your parent? who's your keeper? π
is_branch( )
Check if the reference is a branch. πΏ
is_remote( )
Check if the reference is remote. π‘
is_tag( )
Check if the reference lives in the "refs/tags" namespace. π·οΈ
is_note( )
Check if the reference lives in the "refs/notes" namespace. π
π AUTHOR π
- Alessandro Ghedini <alexbio@cpan.org>
- Jacques Germishuys <jacquesg@cpan.org>
legends, both of them π
π 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 page, bestie!! this was perl v5.42.3, dated 2026-08-19, and it lives in the Git::R...ference(3pm) manual. mwah π go build something iconic with your refs, 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