Skip to main content

Crate git2db

Crate git2db 

Source
Expand description

Git2DB - Git-native database operations using libgit2

This library provides a high-level interface for using Git repositories as databases, with submodules as the primary storage mechanism for artifacts.

Now enhanced with hyprstream-inspired patterns for better thread safety, UUID-based model management, and robust registry operations.

Re-exports§

pub use config::Git2DBConfig;
pub use config::GitSignature;
pub use config::WorktreeConfig;
pub use errors::Git2DBError;
pub use errors::Git2DBResult;
pub use errors::LfsErrorKind;
pub use lfs::is_lfs_pointer;
pub use lfs::LfsPointer;
pub use lfs::LfsSmudge;
pub use lfs::LfsStorage;
pub use lfs::ProcessingStats;
pub use branch::Branch;
pub use branch::BranchKind;
pub use branch::BranchManager;
pub use clone_builder::CloneBuilder;
pub use manager::GitManager;
pub use merge::Candidate;
pub use merge::CandidateComposer;
pub use merge::ConflictEntry;
pub use merge::ConflictReport;
pub use merge::ConflictSide;
pub use merge::MergeTreesResult;
pub use references::GitRef;
pub use references::IntoGitRef;
pub use registration_builder::RegistrationBuilder;
pub use registry::Git2DB;
pub use registry::RemoteConfig;
pub use registry::RepoId;
pub use registry::TrackedRepository;
pub use remote::Remote;
pub use remote::RemoteManager;
pub use repository_handle::RepositoryHandle;
pub use repository_handle::RepositoryStatus;
pub use stage::StageManager;
pub use stage::StagedFile;
pub use transaction::IsolationMode;
pub use transaction::TransactionHandle;
pub use transport::TransportFactory;
pub use storage::Driver;
pub use storage::DriverRegistry;
pub use storage::StorageDriver;

Modules§

auth
Authentication and credential management
branch
Branch management for tracked repositories
callback_config
Send-safe callback configuration for async git operations
clone_builder
Fluent builder API for cloning repositories
clone_options
Clone operation options
config
Configuration for git2db operations
errors
Unified error handling for git2db operations
gittorrent_integration
GitTorrent transport integration for git2db
lfs
Git LFS pointer support with XET storage backend
manager
Git repository manager with thread-safe operations
merge
In-memory candidate merge composition (epic #1427, issue #1428).
ops
Quick operations using global manager
pinned_disk
Bounded-memory, exact-commit projection for path-based model loaders.
pinned_tree
Owned, exact-commit input capture for consumers that cannot trust a worktree.
references
Reference resolution and management
registration_builder
Fluent builder API for registering repositories and worktrees
registry
Unified git2db registry implementation
remote
Remote management for tracked repositories
repo_accessor
Shared repository access trait for managers
repository
Repository management and caching
repository_handle
Repository handle for git-native operations
stage
Staging area management for tracked repositories
storage
Storage drivers following Docker’s graphdriver pattern
transaction
Transaction support for atomic registry operations
transport
Custom git transport support for git2db
transport_registry
Thread-safe transport registry for custom git transports
utils
Utility functions for git2db
xet
XET large file storage integration
xet_filter
XET large file storage filter integration

Macros§

ref_error
Helper macro for creating reference errors
repo_error
Helper macro for creating repository errors
submodule_error
Helper macro for creating submodule errors

Structs§

Oid
Unique identity of any object (commit, tree, blob, tag).
Repository
An owned git repository, representing all state associated with the underlying filesystem.
XetConfig
XET large file storage configuration

Constants§

VERSION
Version of git2db library

Functions§

create_registry
Create a new registry at the specified path
init
Initialize global Git2DB with default config (hyprstream pattern)
init_with_config
Initialize global Git2DB with custom configuration
manager
Get the global GitManager instance