MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / computeBranch

Function computeBranch

src/utils/git/gitFilesystem.ts:500–510  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

resolveGitDirFunction · 0.85
readGitHeadFunction · 0.85

Tested by

no test coverage detected