Xgit v0.1.6 Xgit.Core.Object View Source
Describes a single object stored (or about to be stored) in a git repository.
This struct is constructed, modified, and shared as a working description of how to find and describe an object before it gets written to a repository.
Link to this section Summary
Functions
Return true
if the struct describes a valid object.
Link to this section Types
Link to this type
t()
View Sourcet() :: %Xgit.Core.Object{ content: Xgit.Core.ContentSource.t(), id: Xgit.Core.ObjectId.t() | :unknown, size: non_neg_integer() | :unknown, type: Xgit.Core.ObjectType.t() }
This struct describes a single object stored or about to be stored in a git repository.
Struct Members
:type
: the object's type (:blob
,:tree
,:commit
, or:tag
):content
: how to obtain the content (seeXgit.Core.ContentSource
):size
: size (in bytes) of the object or:unknown
:id
: object ID (40 chars hex) of the object or:unknown
Link to this section Functions
Return true
if the struct describes a valid object.
IMPORTANT: This validation only verifies that the struct itself is valid.
It does not inspect the content of the object. That check can be performed by
Xgit.Core.ValidateObject.check/2
.