source dump of claude code
1import { findGitRoot } from '../git.js'
2
3// Note: This is used to check git repo status synchronously
4// Uses findGitRoot which walks the filesystem (no subprocess)
5// Prefer `dirIsInGitRepo()` for async checks
6export function projectIsInGitRepo(cwd: string): boolean {
7 return findGitRoot(cwd) !== null
8}