(index: DedupIndex)
| 82 | } |
| 83 | |
| 84 | function saveDedupIndex(index: DedupIndex): void { |
| 85 | const dir = path.dirname(getDedupPath()); |
| 86 | fs.mkdirSync(dir, { recursive: true }); |
| 87 | const tmp = getDedupPath() + '.tmp'; |
| 88 | fs.writeFileSync(tmp, JSON.stringify(index, null, 2)); |
| 89 | fs.renameSync(tmp, getDedupPath()); |
| 90 | } |
| 91 | |
| 92 | // --- WorktreeManager --- |
| 93 |