Git::Raw::Tree(3pm)

πŸ’– Git::Raw::Tree β€” the tree class, bestie πŸ’–

okay so this is Git::Raw::Tree, a page from the User Contributed Perl Documentation section (that's the 3pm part, iykyk). Buckle up, we're talking Git trees and it's gonna be cute.


✨ VERSION ✨

version 0.90 β€” the glow-up number, keep it in mind.


🌸 DESCRIPTION 🌸

A Git::Raw::Tree represents a Git tree. That's it. That's the vibe. It's a tree, it does tree things, main character energy fr fr.

⚠️ WARNING: The API of this module is unstable and may change without warning. Any change will be appropriately documented in the changelog, so don't come for me β€” the changelog always eats. πŸ’…

πŸŽ€ METHODS πŸŽ€

πŸ’– lookup( $repo, $id )

Grabs the tree that matches $id. Lowkey this is pretty much the exact same thing as "$repo->lookup($id)", except it only gives you trees back β€” no blobs sneaking in, no shade. And if the tree doesn't exist? It returns "undef". Not found, not serving. 🫢

πŸ’– owner( )

Returns the Git::Raw::Repository that owns the tree. Every tree has a parent, periodt.

πŸ’– id( )

Gives you the id of the tree, as a string. A little string. A little guy. ✨

πŸ’– entries( )

Returns a whole list of Git::Raw::Tree::Entry objects. The whole squad. 🌈

πŸ’– entry_byname( $name )

Returns a single Git::Raw::Tree::Entry object by name. If the entry can't be found, this function returns "undef" β€” a polite little "she's not here bestie". 😭

πŸ’– entry_bypath( $path )

Returns a Git::Raw::Tree::Entry object by path. Same deal: if the entry can't be found, you get "undef". No drama, just undef. πŸ™ˆ

πŸ’– merge( $ancestor, $theirs, [\%merge_opts] )

Merges $theirs into this tree. Both $ancestor and $theirs should be Git::Raw::Tree objects. For valid %merge_opts values, go look at "Git::Raw::Repository->merge()" β€” that's where the receipts live. Returns a Git::Raw::Index object holding the merge result. Slay. πŸ”₯

πŸ’– diff( [\%diff_opts] )

Computes the Git::Raw::Diff between two trees. For valid %diff_opts values, check "Git::Raw::Repository->diff()" β€” same energy, different function. πŸ‘‘

πŸ’– is_tree( )

Returns true. Because it is one. Iconic behavior, honestly. πŸ’…

πŸ’– is_blob( )

Returns false. Not a blob, never was, never will be. Vibe check passed. πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Alessandro Ghedini <alexbio@cpan.org>

Jacques Germishuys <jacquesg@cpan.org>

Two legends, one module. Respect. 🫢


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.


aaaand that's the whole page bestie, no cap. brought to you by perl v5.42.3, dated 2026-08-19, straight from the Git::Raw::Tree(3pm) manual. go forth and tree responsibly. πŸ¦‹πŸŒΈπŸ’œ

πŸ“¦ where this page comes from