From 9a0970a12bdcae105b6f3f65c0a72d95a209bd35 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 29 Aug 2025 20:19:23 -0700 Subject: rework std.Io.Writer.Allocating to support runtime-known alignment Also, breaking API changes to: * std.fs.Dir.readFileAlloc * std.fs.Dir.readFileAllocOptions --- src/Package/Fetch/git.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Package/Fetch/git.zig') diff --git a/src/Package/Fetch/git.zig b/src/Package/Fetch/git.zig index c82a5ab078..df0366c783 100644 --- a/src/Package/Fetch/git.zig +++ b/src/Package/Fetch/git.zig @@ -1599,7 +1599,7 @@ fn runRepositoryTest(comptime format: Oid.Format, head_commit: []const u8) !void const max_file_size = 8192; if (!skip_checksums) { - const index_file_data = try git_dir.dir.readFileAlloc(testing.allocator, "testrepo.idx", max_file_size); + const index_file_data = try git_dir.dir.readFileAlloc("testrepo.idx", testing.allocator, .limited(max_file_size)); defer testing.allocator.free(index_file_data); // testrepo.idx is generated by Git. The index created by this file should // match it exactly. Running `git verify-pack -v testrepo.pack` can verify @@ -1675,7 +1675,7 @@ fn runRepositoryTest(comptime format: Oid.Format, head_commit: []const u8) !void \\revision 19 \\ ; - const actual_file_contents = try worktree.dir.readFileAlloc(testing.allocator, "file", max_file_size); + const actual_file_contents = try worktree.dir.readFileAlloc("file", testing.allocator, .limited(max_file_size)); defer testing.allocator.free(actual_file_contents); try testing.expectEqualStrings(expected_file_contents, actual_file_contents); } -- cgit v1.2.3