class
Agate::ODBBackend
- Agate::ODBBackend
- Reference
- Object
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.crConstructors
-
.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.
-
.one_pack(index_file : String) : ODBBackend
Creates a backend from a single pack file index.
-
.pack(objects_dir : String) : ODBBackend
Creates a pack-file backend for the given objects directory.
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.
def self.one_pack(index_file : String) : ODBBackend
#
Creates a backend from a single pack file index.
def self.pack(objects_dir : String) : ODBBackend
#
Creates a pack-file backend for the given objects directory.