chore(checkpoints): remove redundant normalizedPath redeclarations

This commit is contained in:
daniel-lxs 2025-11-06 18:32:20 -05:00
parent fd22d0f080
commit 05fb2a3645
No known key found for this signature in database
GPG key ID: 21C74479048B3AA6

View file

@ -251,8 +251,6 @@ export abstract class ShadowCheckpointService extends EventEmitter {
!normalizedPath.startsWith(".git/") &&
normalizedPath !== ".git/HEAD"
) {
// Normalize path first to handle Windows-style backslashes
const normalizedPath = result.path.replace(/\\/g, "/")
// Extract repo directory (remove .git/HEAD)
const gitDir = path.dirname(normalizedPath)
const repoDir = path.dirname(gitDir)
@ -284,8 +282,6 @@ export abstract class ShadowCheckpointService extends EventEmitter {
const content = await fs.readFile(gitFilePath, "utf8")
if (content.trim().startsWith("gitdir:")) {
// This is a worktree - exclude its directory
// Normalize path first to handle Windows-style backslashes
const normalizedPath = result.path.replace(/\\/g, "/")
const repoDir = path.dirname(normalizedPath)
nestedRepos.add(repoDir)
}