Merge branch 'me/fetch-into-shallow-safety'
[gitweb.git] / builtin / index-pack.c
index 06dd973a78a86de002ebc7559a34b6b743deced3..48fa4724aa01b67fd53682e8db51c8013c5bc5fe 100644 (file)
@@ -786,7 +786,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
        assert(data || obj_entry);
 
        read_lock();
-       collision_test_needed = has_sha1_file(sha1);
+       collision_test_needed = has_sha1_file_with_flags(sha1, HAS_SHA1_QUICK);
        read_unlock();
 
        if (collision_test_needed && !data) {
@@ -1276,7 +1276,6 @@ static int write_compressed(struct sha1file *f, void *in, unsigned int size)
        int status;
        unsigned char outbuf[4096];
 
-       memset(&stream, 0, sizeof(stream));
        git_deflate_init(&stream, zlib_compression_level);
        stream.next_in = in;
        stream.avail_in = size;