aboutsummaryrefslogtreecommitdiff
path: root/src/Package/Fetch
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-08-07 19:53:29 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-08-07 19:55:40 -0700
commit8da645c883c3477ef21c72603434f130c1c43e65 (patch)
treebe39691d1cc5aebcc2ed3e5f774c79a0ce308703 /src/Package/Fetch
parent8721efece4f6cf04341626909d9118d9e1c5bf4c (diff)
downloadzig-8da645c883c3477ef21c72603434f130c1c43e65.tar.gz
zig-8da645c883c3477ef21c72603434f130c1c43e65.zip
Fetch: fix FetchStream logic
Diffstat (limited to 'src/Package/Fetch')
-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 4a14465672..fb0a2934dc 100644
--- a/src/Package/Fetch/git.zig
+++ b/src/Package/Fetch/git.zig
@@ -1114,8 +1114,8 @@ pub const Session = struct {
}
const buf = limit.slice(try w.writableSliceGreedy(1));
const n = @min(buf.len, fs.remaining_len);
- @memcpy(buf[0..n], input.buffered()[0..n]);
- input.toss(n);
+ try input.readSliceAll(buf[0..n]);
+ w.advance(n);
fs.remaining_len -= n;
return n;
}