Crate git_odb

Source
Expand description

Git stores all of its data as Objects, which are data along with a hash over all data. Thus it’s an object store indexed by the signature of data itself with inherent deduplication: the same data will have the same hash, and thus occupy the same space within the store.

There is only one all-round object store, also known as the Store, as it supports everything most of what git has to offer.

  • loose object reading and writing
  • access to packed objects
  • multiple loose objects and pack locations as gathered from alternates files.

§Feature Flags

  • serde1 — Data structures implement serde::Serialize and serde::Deserialize.

Re-exports§

pub use git_pack as pack;

Modules§

alternate
A file with directories of other git object databases to use when reading objects.
cache
find
loose
An object database storing each object in a zlib compressed file with its hash in the path
sink
store
The standard object store which should fit all needs.

Structs§

Cache
A way to access objects along with pre-configured thread-local caches for packed base objects as well as objects themselves.
Sink
It can optionally compress the content, similarly to what would happen when using a loose::Store.
Store
The object store for use in any applications with support for auto-updates in the light of changes to the object database.

Traits§

Find
Describe how object can be located in an object store.
FindExt
An extension trait with convenience functions.
Header
A way to obtain object properties without fully decoding it.
HeaderExt
An extension trait with convenience functions.
Write
Describe the capability to write git objects into an object store.

Functions§

at
Create a new cached handle to the object store.
at_opts
Create a new cached handle to the object store with support for additional options.
sink
Create a new Sink with compression disabled.

Type Aliases§

Handle
A thread-local handle to access any object.
HandleArc
A thread-local handle to access any object, but thread-safe and independent of the actual type of OwnShared or feature toggles in git-features.