Current best-known content of a file: staged > committed > disk.
(rel: string)
| 91 | |
| 92 | /** Current best-known content of a file: staged > committed > disk. */ |
| 93 | private async currentContent(rel: string): Promise<string | null> { |
| 94 | if (this.staged.has(rel)) return this.staged.get(rel)!.content; |
| 95 | if (this.committed.has(rel)) return this.committed.get(rel)!; |
| 96 | if (this.deleted.has(rel)) return null; |
| 97 | try { return await fs.readFile(this.abs(rel), 'utf-8'); } catch { return null; } |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Dry-run a candidate result. Stages its edits provisionally, then runs the |
no test coverage detected