Gitility.Object (Gitility v0.2.0)

Copy Markdown View Source

A raw Git object: ID, type, and full payload bytes.

This is the currency of the ODB layer — what Gitility.ODB.read/3 returns and what Gitility.ODB.Backend.read_many/2 supplies. Payloads are the inflated object contents without the <type> <size>\0 header; Gitility recomputes and verifies the object ID from type + payload under verify: :always.

Summary

Types

The four Git object types.

t()

Types

object_type()

@type object_type() :: :commit | :tree | :blob | :tag

The four Git object types.

t()

@type t() :: %Gitility.Object{
  data: binary(),
  oid: Gitility.OID.t(),
  type: object_type()
}