πŸ“„ File detail

utils/memory/versions.ts

🧩 .tsπŸ“ 9 linesπŸ’Ύ 307 bytesπŸ“ text
← Back to All Files

🎯 Use case

This file lives under β€œutils/”, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, …). On the API surface it exposes projectIsInGitRepo β€” mainly functions, hooks, or classes. It composes internal code from git (relative imports). What the file header says: Note: This is used to check git repo status synchronously Uses findGitRoot which walks the filesystem (no subprocess) Prefer `dirIsInGitRepo()` for async checks.

Generated from folder role, exports, dependency roots, and inline comments β€” not hand-reviewed for every path.

🧠 Inline summary

Note: This is used to check git repo status synchronously Uses findGitRoot which walks the filesystem (no subprocess) Prefer `dirIsInGitRepo()` for async checks

πŸ“€ Exports (heuristic)

  • projectIsInGitRepo

πŸ–₯️ Source preview

import { findGitRoot } from '../git.js'

// Note: This is used to check git repo status synchronously
// Uses findGitRoot which walks the filesystem (no subprocess)
// Prefer `dirIsInGitRepo()` for async checks
export function projectIsInGitRepo(cwd: string): boolean {
  return findGitRoot(cwd) !== null
}