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

Function isShallowClone

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

Source from the content-addressed store, hash-verified

667 * The shallow file lives in commonDir, not the per-worktree gitDir.
668 */
669export async function isShallowClone(): Promise<boolean> {
670 const gitDir = await resolveGitDir()
671 if (!gitDir) {
672 return false
673 }
674 const commonDir = (await getCommonDir(gitDir)) ?? gitDir
675 try {
676 await stat(join(commonDir, 'shallow'))
677 return true
678 } catch {
679 return false
680 }
681}
682
683/**
684 * Count worktrees by reading <commonDir>/worktrees/ directory.

Callers

nothing calls this directly

Calls 3

resolveGitDirFunction · 0.85
getCommonDirFunction · 0.85
statFunction · 0.85

Tested by

no test coverage detected