From 42e7e2a53492ed1772b7b5d8b328f8d0a66f8b33 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 25 Mar 2013 16:18:16 -0400 Subject: 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 Signed-off-by: Junio C Hamano diff --git a/streaming.c b/streaming.c index f4126a7..f4ab12b 100644 --- a/streaming.c +++ b/streaming.c @@ -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; } -- cgit v0.10.2-6-g49f6