( db: Database, path: string, incomingKind: "file" | "symlink", )
| 82 | } |
| 83 | |
| 84 | function removeReplaceableFinalEntry( |
| 85 | db: Database, |
| 86 | path: string, |
| 87 | incomingKind: "file" | "symlink", |
| 88 | ): void { |
| 89 | const existing = resolveInode(db, path, { followSymlinks: false }); |
| 90 | if (existing === null) return; |
| 91 | if (incomingKind === "file" && existing.type === "file") return; |
| 92 | |
| 93 | removeInodeTreeAtPath(db, path, existing.inode, existing.type); |
| 94 | } |
| 95 | |
| 96 | // Structural conflict cleanup for upstream applies. This removes |
| 97 | // the local shape without recording tombstones because the incoming |
no test coverage detected