"git fsck" not detecting garbage at the end of blob object files...
- From
John Szakmeister <john@szakmeister.net>
- Date
- Jan 7, 2017, 12:50 UTC
- Message-ID
- <CAEBDL5Uc39JagdmXUxfxh1TPSK3H5wxoTfjK-pfLRYjciBnHpA@mail.gmail.com>
I was perusing StackOverflow this morning and ran across this question: http://stackoverflow.com/questions/41521143/git-fsck-full-only-checking-directories/
It was a simple question about why "checking objects" was not appearing, but in it was another issue. The user purposefully corrupted a blob object file to see if `git fsck` would catch it by tacking extra data on at the end. `git fsck` happily said everything was okay, but when I played with things locally I found out that `git gc` does not like that extra garbage. I'm not sure what the trade-off needs to be here, but my expectation is that if `git fsck` says everything is okay, then all operations using that object (file) should work too.
Is that unreasonable? What would be the impact of fixing this issue?
-John