Documentation
¶
Index ¶
Constants ¶
const (
// HookMarker is the comment line embedded in managed hook scripts.
HookMarker = "# chainloop-trace-managed"
)
Variables ¶
This section is empty.
Functions ¶
func Install ¶
Install installs git hooks for trace automation. gitDir may be either the main repo's .git or a per-worktree gitdir (.git/worktrees/<name>); the resolved hooks directory is returned so callers can log it.
Hooks are always written to the *common* hooks dir, since git only reads hooks/ from the shared .git/ even when invoked from a linked worktree.
Pass skipPrePush=true to install only commit-msg and post-commit; used by trace run, which drives the attestation push itself.
func IsInstalled ¶
IsInstalled reports whether the managed hooks are present and carry the chainloop marker. Pass skipPrePush=true to exclude pre-push from the check, matching what trace run installs.
gitDir may point at a per-worktree gitdir; the common hooks dir is resolved internally (see resolveHooksDir).
Types ¶
This section is empty.