diff --git a/libs/gpu-dawn/sdk.zig b/libs/gpu-dawn/sdk.zig index 88816ad4..c1a735c5 100644 --- a/libs/gpu-dawn/sdk.zig +++ b/libs/gpu-dawn/sdk.zig @@ -145,7 +145,7 @@ pub fn Sdk(comptime deps: anytype) type { if (!std.mem.eql(u8, current_revision, revision)) { // Reset to the desired revision exec(allocator, &[_][]const u8{ "git", "fetch" }, dir) catch |err| std.debug.print("warning: failed to 'git fetch' in {s}: {s}\n", .{ dir, @errorName(err) }); - try exec(allocator, &[_][]const u8{ "git", "reset", "--quiet", "--hard", revision }, dir); + try exec(allocator, &[_][]const u8{ "git", "checkout", "--quiet", "--force", revision }, dir); try exec(allocator, &[_][]const u8{ "git", "submodule", "update", "--init", "--recursive" }, dir); } return; @@ -154,7 +154,7 @@ pub fn Sdk(comptime deps: anytype) type { std.log.info("cloning required dependency..\ngit clone {s} {s}..\n", .{ clone_url, dir }); try exec(allocator, &[_][]const u8{ "git", "clone", "-c", "core.longpaths=true", clone_url, dir }, sdkPath("/")); - try exec(allocator, &[_][]const u8{ "git", "reset", "--quiet", "--hard", revision }, dir); + try exec(allocator, &[_][]const u8{ "git", "checkout", "--quiet", "--force", revision }, dir); try exec(allocator, &[_][]const u8{ "git", "submodule", "update", "--init", "--recursive" }, dir); return; },