Documentation
¶
Overview ¶
Package gitmeta is the single helper through which core learns about the git repository containing the task files (ADR 0004). It provides repo identity (the shared git common directory) and worktree discovery, always degrading to inert behavior when git is absent or the directory is not a repository.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Debugf = func(_ string, _ ...any) {} Warnf = func(_ string, _ ...any) {} )
Debugf and Warnf are logging hooks, no-ops by default. The CLI wires them to its --debug and --verbose output at startup; keeping them as injection points lets this package stay free of flag and viper state.
Functions ¶
This section is empty.
Types ¶
type Identity ¶
type Identity struct {
CommonDir string // absolute path to the shared .git directory
WorktreeRoot string // top level of the worktree containing the directory
IsLinked bool // true when the directory is inside a linked worktree
}
Identity describes the repository containing a directory, if any. Two paths with the same CommonDir belong to the same repository.
type Worktree ¶
type Worktree struct {
Root string // worktree top-level path
Branch string // e.g. "dnc/042/parser" ("" when detached)
IsLocal bool // true for the worktree the command runs in
TasksDir string // absolute tasks directory, from the worktree's own .taskmd.yaml
}
Worktree is one checkout of the repository that participates in taskmd coordination (it exists on disk and has a .taskmd.yaml at its root).
func ListWorktrees ¶
ListWorktrees enumerates the repository's worktrees via `git worktree list --porcelain`, filtered to checkouts taskmd can use: prunable worktrees, roots missing on disk, and worktrees without a .taskmd.yaml are skipped. A nil identity yields no worktrees.