From a97dec5c30857bf5e82ca64452bdb7205bc7e37e Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sun, 2 Jan 2022 15:28:59 -0800 Subject: [PATCH] [bun install] Fix bug that caused lockfile to appear as dirty in git when there were no real changes --- src/install/install.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/install/install.zig b/src/install/install.zig index e52a6646a4..5f8beb5f8d 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -2455,6 +2455,10 @@ pub const Lockfile = struct { var new = this.*; new.id = invalid_package_id; new.man_dir = builder.append(String, this.man_dir.slice(buf)); + // zero out this field + // it should really not exist in this data type at all, but not sure where to put it + // we waste 1 byte per package doing this! + new.preinstall_state = .unknown; return new; }