Merge branch 'da/difftool-git-files'
[gitweb.git] / streaming.c
index e3d697b88e8cc1449348c02b742af48306a71b2a..2ff036a0fa6c8e7b013d061d16baf33045305950 100644 (file)
@@ -113,7 +113,7 @@ static enum input_source istream_source(const unsigned char *sha1,
 
        oi->typep = type;
        oi->sizep = &size;
-       status = sha1_object_info_extended(sha1, oi);
+       status = sha1_object_info_extended(sha1, oi, 0);
        if (status < 0)
                return stream_error;
 
@@ -152,8 +152,10 @@ struct git_istream *open_istream(const unsigned char *sha1,
        if (filter) {
                /* Add "&& !is_null_stream_filter(filter)" for performance */
                struct git_istream *nst = attach_stream_filter(st, filter);
-               if (!nst)
+               if (!nst) {
                        close_istream(st);
+                       return NULL;
+               }
                st = nst;
        }