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

Function getCommonDir

source code/utils/git/gitFilesystem.ts:275–282  ·  view source on GitHub ↗
(gitDir: string)

Source from the content-addressed store, hash-verified

273 * Returns null if no commondir file exists (regular repo).
274 */
275export async function getCommonDir(gitDir: string): Promise<string | null> {
276 try {
277 const content = (await readFile(join(gitDir, 'commondir'), 'utf-8')).trim()
278 return resolve(gitDir, content)
279 } catch {
280 return null
281 }
282}
283
284/**
285 * 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