From b039718d925475124cb431a05f5933bd191bae27 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 21 Nov 2013 06:48:37 -0500 Subject: drop support for "experimental" loose objects In git v1.4.3, we introduced a new loose object format that encoded some object information outside of the zlib stream. Ultimately the format was dropped in v1.5.3, but we kept the reading side around to help people migrate objects. Each time we open a loose object, we use a heuristic to check whether it is in the normal loose format, or the experimental one. This heuristic is robust in the face of valid data, but it tends to treat corrupted or garbage data as an experimental object. With the regular format, we would notice quickly that zlib's crc does not check out and complain. With the experimental object, we are likely to extract a nonsensical object size and try to allocate a huge buffer, resulting in xmalloc calling "die". This latter behavior is much worse, for two reasons. One, git reports an allocation error when the real error is corruption. And two, the program dies unconditionally, so you cannot even run fsck (which would otherwise ignore the broken object and keep going). We could try to improve the heuristic to err on the side of normal objects in the face of corruption, but there is really little point. The experimental format is long-dead, and was never enabled by default to begin with. We can instead simply remove it. The only affected repository would be one that explicitly set core.legacyheaders in 2007, and then never repacked in the intervening 6 years. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t1013/objects/95/b1625de3ba8b2214d1e0d0591138aea733f64f | Bin 252 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 t/t1013/objects/95/b1625de3ba8b2214d1e0d0591138aea733f64f (limited to 't/t1013/objects/95/b1625de3ba8b2214d1e0d0591138aea733f64f') diff --git a/t/t1013/objects/95/b1625de3ba8b2214d1e0d0591138aea733f64f b/t/t1013/objects/95/b1625de3ba8b2214d1e0d0591138aea733f64f deleted file mode 100644 index 7ac46b4f70..0000000000 Binary files a/t/t1013/objects/95/b1625de3ba8b2214d1e0d0591138aea733f64f and /dev/null differ -- cgit v1.2.3