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

Function getGitRepoRoot

cli/worktree.go:251–258  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249}
250
251func getGitRepoRoot() string {
252 cmd := exec.Command("git", "rev-parse", "--show-toplevel")
253 out, err := cmd.Output()
254 if err != nil {
255 return ""
256 }
257 return strings.TrimSpace(string(out))
258}
259
260func getCurrentBranch() string {
261 cmd := exec.Command("git", "branch", "--show-current")

Callers 4

worktreeCreateMethod · 0.85
worktreeRemoveMethod · 0.85
worktreeStatusMethod · 0.85

Calls 1

OutputMethod · 0.65

Tested by

no test coverage detected