Skip to main content

Module gitobj

Module gitobj 

Source
Expand description

git object encoding: SHA1("<type> <len>\0" || body) ids and zlib loose-object storage (SPEC-GIT-BRIDGE §2).

Structs§

GitObject
An encoded git object: type + body (the bytes after the "<type> <len>\0" header).

Enums§

GitType
The four storable git object types the bridge emits.

Functions§

bytes_from_hex
Strict lowercase-hex decode of an exact expected length.
bytes_hex
Lowercase hex of arbitrary bytes (used for the 64-byte signature and 32-byte hash header values).
sha1_from_hex
Strict inverse of sha1_hex (lowercase only).
sha1_hex
Lowercase hex of a 20-byte git id.

Type Aliases§

Sha1Id
20-byte git object id.