1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 15:46:41 +02:00

read_istream_filtered: propagate read error from upstream

The filter istream pulls data from an "upstream" stream,
running it through a filter function. However, we did not
properly notice when the upstream filter yielded an error,
and just returned what we had read. Instead, we should
propagate the error.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2013-03-25 16:18:16 -04:00 committed by Junio C Hamano
parent f54fac5378
commit 42e7e2a534

View File

@ -237,7 +237,7 @@ static read_method_decl(filtered)
if (!fs->input_finished) {
fs->i_end = read_istream(fs->upstream, fs->ibuf, FILTER_BUFFER);
if (fs->i_end < 0)
break;
return -1;
if (fs->i_end)
continue;
}