diff --git a/cli/src/commands/sync/sync.ts b/cli/src/commands/sync/sync.ts index 429fbd6ebc..0c64a0d857 100644 --- a/cli/src/commands/sync/sync.ts +++ b/cli/src/commands/sync/sync.ts @@ -661,29 +661,6 @@ export async function elementsToMap( const map: { [key: string]: string } = {}; const processedBasePaths = new Set(); - // First pass: collect all file paths to identify branch-specific files - const allPaths: string[] = []; - for await (const entry of readDirRecursiveWithIgnore(ignore, els)) { - if (!entry.isDirectory && !entry.ignored) { - allPaths.push(entry.path); - } - } - - const branchSpecificExists = new Set(); - - if (specificItems) { - const currentBranch = getCurrentGitBranch(); - if (currentBranch) { - for (const path of allPaths) { - if (isCurrentBranchFile(path)) { - const basePath = fromBranchSpecificPath(path, currentBranch); - if (isSpecificItem(basePath, specificItems)) { - branchSpecificExists.add(basePath); - } - } - } - } - } for await (const entry of readDirRecursiveWithIgnore(ignore, els)) { if (entry.isDirectory || entry.ignored) continue;