aboutsummaryrefslogtreecommitdiff
path: root/src/Package/Fetch/git.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-08-29 20:19:23 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-08-30 00:48:50 -0700
commit9a0970a12bdcae105b6f3f65c0a72d95a209bd35 (patch)
treeab0de8f2447b5e52c2bb5c92a976a52fb4b613ee /src/Package/Fetch/git.zig
parent79f267f6b9e7f80a6fed3b1019f9de942841c3be (diff)
downloadzig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.tar.gz
zig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.zip
rework std.Io.Writer.Allocating to support runtime-known alignment
Also, breaking API changes to: * std.fs.Dir.readFileAlloc * std.fs.Dir.readFileAllocOptions
Diffstat (limited to 'src/Package/Fetch/git.zig')
-rw-r--r--src/Package/Fetch/git.zig4
1 files changed, 2 insertions, 2 deletions
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);
}