Skip to content
Français

WorkspaceGitEntry

The fields below cover all variants; the signature specifies their allowed combinations.

  • nameRequired
    string
    Basename of the entry, or the full object key for a transport inventory.
  • pathRequired
    string
    Host path of the entry, or the object key for a transport inventory.
  • stateRequired
    "registered" | "unregistered" | "unavailable" | "skipped"
    registered: a Git worktree of this repository; unregistered: not listed by git worktree list; skipped: not a directory; unavailable: inspection failed, see reason.
  • headVariant-dependent
    string
    HEAD commit listed by git worktree list.
  • branchVariant-dependent
    string | null
    Worktree branch name, or null when HEAD is detached.
  • dirtyVariant-dependent
    boolean
    true when git status reports tracked or untracked changes. Ignored files do not count.
  • lockedVariant-dependent
    boolean
    Whether Git marks the worktree as locked.
  • reasonVariant-dependent
    string
    Why the state is skipped (NOT_DIRECTORY) or unavailable, such as WORKSPACE_CHANGED, REGISTRATION_MISMATCH or GIT_INSPECTION_FAILED.
export type WorkspaceGitEntry = Pick<StorageEntry, "name" | "path"> &
  WorkspaceGitState;