Xgit v0.8.0 Xgit.Tree.Entry View Source

A single file in a tree structure.

Link to this section Summary

Types

t()

A single file in a tree structure.

Functions

Compare two entries according to git file name sorting rules.

Return true if this entry struct describes a valid tree entry.

Link to this section Types

Link to this type

t()

View Source
t() :: %Xgit.Tree.Entry{
  mode: Xgit.FileMode.t(),
  name: Xgit.FilePath.t(),
  object_id: Xgit.ObjectId.t()
}

A single file in a tree structure.

Struct Members

  • name: (FilePath.t) entry path name, relative to top-level directory (without leading slash)
  • object_id: (ObjectId.t) SHA-1 for the represented object
  • mode: (FileMode.t)

Link to this section Functions

Link to this function

compare(entry1, entry2)

View Source
compare(entry1 :: t() | nil, entry2 :: t()) :: Xgit.Util.Comparison.result()

Compare two entries according to git file name sorting rules.

Return Value

  • :lt if entry1 sorts before entry2.
  • :eq if they are the same.
  • :gt if entry1 sorts after entry2.
Link to this function

valid?(entry)

View Source
valid?(entry :: any()) :: boolean()

Return true if this entry struct describes a valid tree entry.