Documentation
¶
Index ¶
- func CommandContext(ctx context.Context, repoRoot string, env []string, args ...string) (*exec.Cmd, error)
- func IsGitUnavailable(err error) bool
- func ResolveTopLevel(ctx context.Context, dir string) (string, error)
- func RunCombinedOutput(ctx context.Context, repoRoot string, env []string, args ...string) ([]byte, error)
- func RunCombinedOutputAllowExitCodes(ctx context.Context, repoRoot string, env []string, allowedExitCodes []int, ...) ([]byte, error)
- func ShowTopLevel(ctx context.Context, dir string) (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandContext ¶
func CommandContext(ctx context.Context, repoRoot string, env []string, args ...string) (*exec.Cmd, error)
CommandContext builds a git command with stable non-interactive output settings.
func IsGitUnavailable ¶
IsGitUnavailable reports whether the git executable is unavailable on the host.
func ResolveTopLevel ¶
ResolveTopLevel resolves the git worktree root for dir and preserves lookup errors.
func RunCombinedOutput ¶
func RunCombinedOutput(ctx context.Context, repoRoot string, env []string, args ...string) ([]byte, error)
RunCombinedOutput runs git and returns combined stdout/stderr with normalized errors.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.