class Agate::ODBBackend

Overview

A pluggable backend for the git object database.

Backends are created via factory methods and then added to an ODB. Once added, libgit2 takes ownership of the backend -- the Crystal wrapper will not free it on finalization.

backend = ODBBackend.pack("/path/to/objects")
odb.add_backend(backend, priority: 1)

Defined in:

agate/odb_backend.cr

Constructors

Constructor Detail

def self.loose(objects_dir : String, compression_level : Int32 = -1, do_fsync : Bool = false, dir_mode : UInt32 = 0) : ODBBackend #

Creates a loose-object backend for the given objects directory.


[View source]
def self.one_pack(index_file : String) : ODBBackend #

Creates a backend from a single pack file index.


[View source]
def self.pack(objects_dir : String) : ODBBackend #

Creates a pack-file backend for the given objects directory.


[View source]