summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-03-25 20:18:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-03-27 20:46:58 (GMT)
commit42e7e2a53492ed1772b7b5d8b328f8d0a66f8b33 (patch)
tree9b15820ba4428dca780fbc9a5d4c708002b6ec81
parentf54fac53786808130c82936e59be16000deba04a (diff)
downloadgit-42e7e2a53492ed1772b7b5d8b328f8d0a66f8b33.zip
git-42e7e2a53492ed1772b7b5d8b328f8d0a66f8b33.tar.gz
git-42e7e2a53492ed1772b7b5d8b328f8d0a66f8b33.tar.bz2
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>
-rw-r--r--streaming.c2
1 files changed, 1 insertions, 1 deletions
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;
}