From 71d038ae8a0afb2dcf3af2a21d2fa6cda5522b19 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Mon, 16 May 2022 10:48:13 -0700 Subject: [PATCH] undo diff logging to minimise baseline churn --- src/vfs/virtualFileSystemWithWatch.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/vfs/virtualFileSystemWithWatch.ts b/src/vfs/virtualFileSystemWithWatch.ts index 638031460ff..be32cbeef03 100644 --- a/src/vfs/virtualFileSystemWithWatch.ts +++ b/src/vfs/virtualFileSystemWithWatch.ts @@ -618,7 +618,6 @@ namespace ts.VirtualFS { writtenFiles?: ESMap; diff(baseline: string[], base: ESMap = new Map()) { - const len = baseline.length; this.fs.forEach(newFsEntry => { diffFsEntry(baseline, base.get(newFsEntry.path), newFsEntry, this.writtenFiles); }); @@ -628,17 +627,12 @@ namespace ts.VirtualFS { diffFsEntry(baseline, oldFsEntry, newFsEntry, this.writtenFiles); } }); - if (len === baseline.length) { - baseline.push("No changes.") - } - else { - baseline.push(""); - } + baseline.push(""); } } function diffFsFile(baseline: string[], fsEntry: FsFile) { - baseline.push(`//// [${fsEntry.fullPath}] added\r\n${fsEntry.content}`, ""); + baseline.push(`//// [${fsEntry.fullPath}]\r\n${fsEntry.content}`, ""); } function diffFsSymLink(baseline: string[], fsEntry: FsSymLink) {