Gitility.TreeEntry (Gitility v0.3.0)

Copy Markdown View Source

One entry from a tree listing.

path and name are raw bytes (see Gitility.Path). type is the entry's semantic kind; the original Git mode is preserved alongside it, so no information is discarded by the typing.

size is populated only when the listing requested include: [:size] — packed object headers may cost work, so sizes are opt-in.

Symlinks are never followed; gitlinks (submodule pointers) are returned as typed entries and never opened.

Summary

Types

The semantic kind of a tree entry.

t()

Types

entry_type()

@type entry_type() :: :blob | :tree | :symlink | :gitlink

The semantic kind of a tree entry.

t()

@type t() :: %Gitility.TreeEntry{
  mode: non_neg_integer(),
  name: binary(),
  oid: Gitility.OID.t(),
  path: binary(),
  size: non_neg_integer() | nil,
  type: entry_type()
}