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

Function isShallowClone

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

Source from the content-addressed store, hash-verified

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