pub fn read_batch_reply(
stream: &mut dyn BufRead,
request: &[u8],
) -> Result<BatchReply, CandidateError>Expand description
What:
Read one complete reply to request from stream.
request is the exact request line that was sent,
without its line feed.
Why:
Git echoes the request in a missing reply and prints the resolved name in a
found reply.
When the request is itself a complete object name,
a found reply
naming any other object means requests and replies are out of step,
and its
bytes are refused rather than attributed to the wrong object.
In TS you’d write (pseudocode):
async function readBatchReply(stream: Readable, request: Buffer): Promise<BatchReply>;