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

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

Structs

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

Traits

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

Functions

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

Type Definitions

A thread-local handle to access any object.
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.