Skip to content

Commit 2e9ea04

Browse files
fix: remove unused needsRepair variable in repairTruncatedDiff
Address review feedback from @edelauna (code review #3284681514): needsRepair was assigned but never read, making it a dead store. The variable served no functional purpose in the repair loop, so it has been removed.
1 parent 5c105ac commit 2e9ea04

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

src/core/diff/strategies/multi-search-replace.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ export class MultiSearchReplaceDiffStrategy implements DiffStrategy {
258258
const blocks = diffContent.split(/(?=(?<!\\)<<<<<<< SEARCH)/)
259259

260260
let repaired = ""
261-
let needsRepair = false
262261

263262
for (let i = 0; i < blocks.length; i++) {
264263
const block = blocks[i]
@@ -287,7 +286,6 @@ export class MultiSearchReplaceDiffStrategy implements DiffStrategy {
287286
// Block needs repair. Build a clean block ending at >>>>>>> REPLACE, then
288287
// re-add an inter-block separator if more (non-empty) blocks follow, so the
289288
// appended closer never gets glued to the next "<<<<<<< SEARCH".
290-
needsRepair = true
291289
const isLast = blocks.slice(i + 1).every((b) => b.trim() === "")
292290
const separator = isLast ? "" : "\n\n"
293291

0 commit comments

Comments
 (0)