MCPcopy Create free account
hub / github.com/JordanCoin/codemap / gitCurrentBranch

Function gitCurrentBranch

cmd/hooks.go:598–610  ·  view source on GitHub ↗
(root string)

Source from the content-addressed store, hash-verified

596}
597
598func gitCurrentBranch(root string) (string, bool) {
599 cmd := exec.Command("git", "rev-parse", "--abbrev-ref", "HEAD")
600 cmd.Dir = root
601 out, err := cmd.Output()
602 if err != nil {
603 return "", false
604 }
605 branch := strings.TrimSpace(string(out))
606 if branch == "" {
607 return "", false
608 }
609 return branch, true
610}
611
612func showRecentHandoffSummary(artifact *handoff.Artifact) {
613 if artifact == nil {

Callers 3

hookSessionStartFunction · 0.70
buildProjectContextFunction · 0.70

Calls

no outgoing calls

Tested by 1