MCPcopy Create free account
hub / github.com/diillson/chatcli / isGitRepo

Function isGitRepo

cli/worktree.go:245–249  ·  view source on GitHub ↗

--- git helpers ---

()

Source from the content-addressed store, hash-verified

243// --- git helpers ---
244
245func isGitRepo() bool {
246 cmd := exec.Command("git", "rev-parse", "--is-inside-work-tree")
247 out, err := cmd.Output()
248 return err == nil && strings.TrimSpace(string(out)) == "true"
249}
250
251func getGitRepoRoot() string {
252 cmd := exec.Command("git", "rev-parse", "--show-toplevel")

Callers 5

worktreeCreateMethod · 0.85
worktreeListMethod · 0.85
worktreeRemoveMethod · 0.85
worktreeStatusMethod · 0.85

Calls 1

OutputMethod · 0.65

Tested by

no test coverage detected