Exgit.Pack.Writer (exgit v0.1.0)

Copy Markdown View Source

Build a pack (build/1) and optionally its .idx index (build_with_index/1) from a list of objects.

The idx output is v2 format and verifies clean with git verify-pack. Objects are written as full (non-delta) compressed zlib streams; delta compression is a v0.3+ item.

Summary

Functions

Build a pack AND its index. Returns {pack_bytes, idx_bytes}.

Functions

build(objects)

@spec build([Exgit.Object.t()]) :: binary()

build_with_index(objects)

@spec build_with_index([Exgit.Object.t()]) :: {binary(), binary()}

Build a pack AND its index. Returns {pack_bytes, idx_bytes}.