Documentation
¶
Overview ¶
Package gitutil shells out to the `git` CLI (docs/conventions.md: "Git/GitHub: never go-git") to answer the small set of questions the daemon needs about a launch directory: is it a git checkout, where is its top level, what branch is it on, is it a linked worktree, and (for the reader) which files does git see there. Nothing here is Claude-Code-format knowledge; it stays out of internal/claudecode by design.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Branch ¶
Branch returns the current branch name, or nil when dir isn't a git checkout or is in a detached-HEAD state — the wire's own "null when not git" contract (docs/protocol.md's repo.branch).
func IsWorktree ¶
IsWorktree reports whether dir is a linked worktree: its git-dir and the repository's common-dir differ (kb:adr/launch-hybrid-mru-directory-memory's recognition rule).
func ListFiles ¶ added in v0.18.3
ListFiles returns every path `git ls-files -co --exclude-standard` reports for dir (a checkout root) — tracked files plus untracked-but-not-ignored ones, one repo-relative, forward-slash path per entry, in git's own listing order. It answers only what git considers present; a caller that cares about a subset (internal/server's reader wants only the `.md` ones) filters the result itself, so this stays a plain listing rather than growing a second, caller-specific query — the one place that runs `git ls-files` at all, so a caller never carries its own git argv.
Types ¶
This section is empty.