Skip to content

Commit

Permalink
read_istream_filtered: propagate read error from upstream
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Mar 27, 2013
1 parent f54fac5 commit 42e7e2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion streaming.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 42e7e2a

Please sign in to comment.