Yup, it's definitely only a partial fix :-)  I know I'm only fixing what's easy - not what's Hard.

However there's at least one problem-case where what's /easy/ is also what is *beneficial* , and that's in the case of the Unwise-Big-Blob-Committer:

The Unwise-Big-Blob-Committer unwisely commits a 500MB file into their repo - perhaps they regret it later, but they just delete it in a later commit, and move on - they're unlikely to clean their repository using rebasing or whatever. If the 500MB file compresses well the pack-file won't even make a dint in the network bandwidth when cloning.

The 500MB file is never part of a delta because it's a random dumb file - no-one ever committed a file even remotely like it. But it's still in the pack file, it still verified by JGit's IndexPack.whole() method when the pack file is loaded, and still causes an OutOfMemoryException.


Fixing the Hard thing here- resolveDeltas - fixes the problem for people who actually *deliberately* use large files in their repos. Fixing the 'easy' thing - object checking - fixes the problem for people who once *accidentally* checked a dumb big file into their project. I think the first scenario is pretty rare. The second is more common. At the very least, it would be nice to help people who have been a victim of the UBBC :)