Dagger.WorkspaceGit (dagger v1.0.0-beta.19)

Copy Markdown View Source

Local git state for a workspace.

Summary

Functions

Return a self-contained Git metadata directory for this workspace's HEAD, including its full reachable history and an index matching HEAD.

The checked-out HEAD of this workspace.

A unique identifier for this WorkspaceGit.

Uncommitted changes in this workspace, using the same rules as GitRepository.uncommitted.

Types

t()

@type t() :: %Dagger.WorkspaceGit{client: term(), query_builder: term()}

Functions

directory(workspace_git)

@spec directory(t()) :: Dagger.Directory.t()

Return a self-contained Git metadata directory for this workspace's HEAD, including its full reachable history and an index matching HEAD.

Mount this directory at .git alongside workspace.directory("/") to create a usable checkout. Pending workspace edits remain uncommitted; the original checkout's staging state is not preserved.

This is a snapshot: Git writes to a mounted copy do not update the workspace. The workspace must have a Git repository with a HEAD commit.

head(workspace_git)

@spec head(t()) :: Dagger.GitRef.t()

The checked-out HEAD of this workspace.

id(workspace_git)

@spec id(t()) :: {:ok, String.t()} | {:error, term()}

A unique identifier for this WorkspaceGit.

uncommitted(workspace_git)

@spec uncommitted(t()) :: Dagger.Changeset.t()

Uncommitted changes in this workspace, using the same rules as GitRepository.uncommitted.