MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / computeBranch

Function computeBranch

source code/utils/git/gitFilesystem.ts:502–512  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

500const gitWatcher = new GitFileWatcher()
501
502async function computeBranch(): Promise<string> {
503 const gitDir = await resolveGitDir()
504 if (!gitDir) {
505 return 'HEAD'
506 }
507 const head = await readGitHead(gitDir)
508 if (!head) {
509 return 'HEAD'
510 }
511 return head.type === 'branch' ? head.name : 'HEAD'
512}
513
514async function computeHead(): Promise<string> {
515 const gitDir = await resolveGitDir()

Callers

nothing calls this directly

Calls 2

resolveGitDirFunction · 0.85
readGitHeadFunction · 0.85

Tested by

no test coverage detected