Xgit v0.1.2 Xgit.Plumbing.LsFiles.Stage

Show information about files in the index.

Analogous to git ls-files --stage.

Link to this section Summary

Types

Reason codes that can be returned by run/1.

Functions

Retrieves information about files in the working tree as described by the index file.

Link to this section Types

Reason codes that can be returned by run/1.

Link to this section Functions

Link to this function

run(repository)
run(repository :: Xgit.Repository.t()) ::
  {:ok, entries :: [Xgit.Core.DirCache.Entry.t()]}
  | {:error, reason :: reason()}

Retrieves information about files in the working tree as described by the index file.

Parameters

repository is the Xgit.Repository (PID) to search for the object.

Return Value

{:ok, entries}. entries will be a list of Xgit.Core.DirCache.Entry structs in sorted order.

{:error, :invalid_repository} if repository doesn't represent a valid Xgit.Repository process.

{:error, :bare} if repository doesn't have a working tree.

{:error, reason} if the index file for repository isn't valid. (See Xgit.Repository.WorkingTree.ParseIndexFile.from_iodevice/1 for possible reason codes.)