Skip to content

Commit 8da645c

Browse files
committed
Fetch: fix FetchStream logic
1 parent 8721efe commit 8da645c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Package/Fetch/git.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,8 @@ pub const Session = struct {
11141114
}
11151115
const buf = limit.slice(try w.writableSliceGreedy(1));
11161116
const n = @min(buf.len, fs.remaining_len);
1117-
@memcpy(buf[0..n], input.buffered()[0..n]);
1118-
input.toss(n);
1117+
try input.readSliceAll(buf[0..n]);
1118+
w.advance(n);
11191119
fs.remaining_len -= n;
11201120
return n;
11211121
}

0 commit comments

Comments
 (0)