diff --git a/src/common.zig b/src/common.zig index 3a6852e79e5f21b60662aedc1e0a7cf93fc72fe5..e17e3abd48453fa65dff05e460babac957333e75 100644 --- a/src/common.zig +++ b/src/common.zig @@ -151,7 +151,7 @@ pub fn get_modpath(cachepath: string, d: zigmod.Dep, options: *CollectOptions) ! if ((try u.run_cmd(options.alloc, pv, &.{ "git", "checkout", vers.string })) > 0) { u.fail("fetch: git: {s}: {s} {s} does not exist", .{ d.path, @tagName(vers.id), vers.string }); } - if (builtin.os.tag != .windows and vers.id != .branch) { + if (builtin.os.tag != .windows and vers.id == .commit) { const pvd = try std.fs.cwd().openDir(pv, .{}); try pvd.deleteTree(".git"); }