authorgravatar for igor.anic@gmail.comIgor Anić <igor.anic@gmail.com> 2024-02-22 17:20:41+01:00
committergravatar for igor.anic@gmail.comIgor Anić <igor.anic@gmail.com> 2024-02-22 17:20:41+01:00
loga5326c5ef81885821d39f843bbe83c6a3aaff170
tree5ad439a449fa89c998aaf418cd920a72579e336a
parentd00faa2407cdeaa058da62f2d95f64f9e7ed6a09

return few previous fixes

Review: https://github.com/ziglang/zig/pull/19032#pullrequestreview-1896251841

1 files changed, 3 insertions(+), 3 deletions(-)

src/Package/Fetch/git.zig+3-3
......@@ -1091,7 +1091,7 @@ pub fn indexPack(allocator: Allocator, pack: std.fs.File, index_writer: anytype)
10911091 try index_writer.writeAll(&index_checksum);
10921092}
10931093
1094// Performs the first pass over the packfile data for index construction.
1094/// Performs the first pass over the packfile data for index construction.
10951095/// This will index all non-delta objects, queue delta objects for further
10961096/// processing, and return the pack checksum (which is part of the index
10971097/// format).
......@@ -1117,14 +1117,14 @@ fn indexPackFirstPass(
11171117 const entry_header = try EntryHeader.read(pack_reader);
11181118
11191119 switch (entry_header) {
1120 inline .commit, .tree, .blob, .tag => |object, tag| {
1120 .commit, .tree, .blob, .tag => |object| {
11211121 var entry_decompress_stream = std.compress.zlib.decompressor(pack_reader);
11221122 var entry_counting_reader = std.io.countingReader(entry_decompress_stream.reader());
11231123 var entry_hashed_writer = hashedWriter(std.io.null_writer, Sha1.init(.{}));
11241124 const entry_writer = entry_hashed_writer.writer();
11251125 // The object header is not included in the pack data but is
11261126 // part of the object's ID
1127 try entry_writer.print("{s} {}\x00", .{ @tagName(tag), object.uncompressed_length });
1127 try entry_writer.print("{s} {}\x00", .{ @tagName(entry_header), object.uncompressed_length });
11281128 var fifo = std.fifo.LinearFifo(u8, .{ .Static = 4096 }).init();
11291129 try fifo.pump(entry_counting_reader.reader(), entry_writer);
11301130 if (entry_counting_reader.bytes_read != object.uncompressed_length) {