ExGitEngine.Packfile (ex_git_engine v0.9.2)

Copy Markdown

Conveniences for reading and writting Git pack files.

Summary

Functions

Returns a list of ODB objects and their type for the given PACK data.

Same as parse/1 but starts from the given iterator.

Returns the PACK version and the number of objects it contains.

Types

obj()

@type obj() :: {ExGitEngine.Git.obj_type(), binary()}

obj_iter()

@type obj_iter() :: {non_neg_integer(), non_neg_integer(), binary()}

Functions

parse(pack)

@spec parse(binary()) :: {:pack, [obj()]} | {:buffer, [obj()], obj_iter()}

Returns a list of ODB objects and their type for the given PACK data.

parse(pack, iterator)

@spec parse(binary(), obj_iter()) :: {:pack, [obj()]} | {:buffer, [obj()], obj_iter()}

Same as parse/1 but starts from the given iterator.

parse_header(pack)

@spec parse_header(binary()) :: {2, non_neg_integer()}

Returns the PACK version and the number of objects it contains.