MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getCommonDir

Function getCommonDir

src/utils/git/gitFilesystem.ts:273–280  ·  view source on GitHub ↗
(gitDir: string)

Source from the content-addressed store, hash-verified

271 * Returns null if no commondir file exists (regular repo).
272 */
273export async function getCommonDir(gitDir: string): Promise<string | null> {
274 try {
275 const content = (await readFile(join(gitDir, 'commondir'), 'utf-8')).trim()
276 return resolve(gitDir, content)
277 } catch {
278 return null
279 }
280}
281
282/**
283 * Read a raw symref file and extract the branch name after a known prefix.

Callers 9

performPostCreationSetupFunction · 0.85
resolveRefFunction · 0.85
startMethod · 0.85
computeRemoteUrlFunction · 0.85
computeDefaultBranchFunction · 0.85
getRemoteUrlForDirFunction · 0.85
isShallowCloneFunction · 0.85
getWorktreeCountFromFsFunction · 0.85
readLastFetchTimeFunction · 0.85

Calls 2

readFileFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected