Xgit v0.2.5 Xgit.Core.Commit View Source

Represents a git commit object in memory.

Link to this section Summary

Types

t()

This struct describes a single commit object so it can be manipulated in memory.

Functions

Renders this commit structure into a corresponding Xgit.Core.Object.

Return true if the value is a commit struct that is valid.

Link to this section Types

Link to this type

t()

View Source
t() :: %Xgit.Core.Commit{
  author: Xgit.Core.PersonIdent.t(),
  committer: Xgit.Core.PersonIdent.t(),
  message: [byte()],
  parents: [Xgit.Core.ObjectId.t()],
  tree: Xgit.Core.ObjectId.t()
}

This struct describes a single commit object so it can be manipulated in memory.

Struct Members

Link to this section Functions

Link to this function

to_object(commit)

View Source
to_object(commit :: t()) :: Xgit.Core.Object.t()

Renders this commit structure into a corresponding Xgit.Core.Object.

If duplicate parents are detected, they will be silently de-duplicated.

If the commit structure is not valid, will raise ArgumentError.

Link to this function

valid?(commit)

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

Return true if the value is a commit struct that is valid.