]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sha1-file.c
Merge branch 'jk/uploadpack-packobjectshook-fix' into maint
[thirdparty/git.git] / sha1-file.c
index 97b74238483e00c3f07bd5ab0879eb84bf5c8dfa..03b86aec710c3afffcd989bd357d28241a0271a7 100644 (file)
@@ -1317,7 +1317,7 @@ int oid_object_info_extended(struct repository *r, const struct object_id *oid,
                         * TODO Pass a repository struct through fetch_object,
                         * such that arbitrary repositories work.
                         */
-                       fetch_object(repository_format_partial_clone, real->hash);
+                       fetch_objects(repository_format_partial_clone, real, 1);
                        already_retried = 1;
                        continue;
                }
@@ -2191,7 +2191,8 @@ static int check_stream_sha1(git_zstream *stream,
         * see the comment in unpack_sha1_rest for details.
         */
        while (total_read <= size &&
-              (status == Z_OK || status == Z_BUF_ERROR)) {
+              (status == Z_OK ||
+               (status == Z_BUF_ERROR && !stream->avail_out))) {
                stream->next_out = buf;
                stream->avail_out = sizeof(buf);
                if (size - total_read < stream->avail_out)