Git::R...Mempack(3pm)

✨ Git::Raw::Mempack β€” the manual page, but make it make sense ✨

okay bestie, welcome to Git::Raw::Mempack(3pm), aka the little in-memory git object database that could πŸ’– This is the Perl doc for it, freshly rewritten so it actually slaps.

Version check: version 0.90 β€” no cap, that's the one we're vibing with today πŸŽ€

🌈 NAME

Git::Raw::Mempack β€” it's the Git in-memory object database class. Like, git objects but living rent-free in your RAM instead of on disk. It's giving ✨main character storage✨.


πŸ¦‹ VERSION

version 0.90


πŸ’… SYNOPSIS

here's the whole ritual, copy it exactly, don't freestyle:

use Git::Raw;

my $mempack = Git::Raw::Mempack -> new;
my $odb = $repo -> odb;
$odb -> add_backend($mempack, 99);

# Create blobs, trees and commits...

# Index the packfile and persist
my $odb_path = catfile($repo -> path, 'objects');
my $tp = Git::Raw::TransferProgress -> new;
my $indexer = Git::Raw::Indexer -> new($odb_path, $odb);

my $pack = $mempack -> dump($repo);
$indexer -> append($pack, $tp);
$indexer -> commit($tp);

the way that you make a mempack, shove it into the object database as a backend with priority 99, build your blobs/trees/commits, then dump it into a packfile and hand that packfile to an indexer so it actually persists… yeah, that's the whole glow-up arc 🌸


🌟 DESCRIPTION

A Git::Raw::Mempack represents a git in-memory object database. 🫢 That's it, that's the vibe β€” everything you write goes into memory first, and you get to decide when it becomes a real packfile.


πŸ‘‘ METHODS

🌸 new( )

Create a new mempack backend. Fresh out the box, zero notes, ready to be somebody's backend πŸ’œ

πŸŽ€ dump( $repo )

Dump all the queued in-memory writes to a packfile. Returns the contents of the packfile. πŸ“¦βœ¨

real talk though: It is the caller's responsibility to ensure that the generated packfile is available to the repository. The function hands you the goods and dips β€” it's not gonna make sure the repo can actually see it. That part is on you, bestie 😭

πŸ¦‹ reset( )

Reset the mempack by clearing all the queued objects. poof πŸ’€ everything queued? gone. clean slate, no drama, iconic behavior honestly.


πŸ’– AUTHOR

Jacques Germishuys <jacquesg@cpan.org> β€” the legend who wrote this, we stan 🌈


Copyright 2016 Jacques Germishuys.

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.


okay that's the whole page 🫢 run by perl v5.42.3, dated 2026-08-19, and yes it is Git::R...Mempack(3pm) β€” the truncation is doing its little thing but the iykyk is real ⭐ bye bestie, go dump some packfiles πŸ’…

πŸ“¦ where this page comes from