Re: "git fsck" not detecting garbage at the end of blob object files...
- From
John Szakmeister <john@szakmeister.net>
- Date
- Jan 13, 2017, 09:16 UTC
- Message-ID
- <CAEBDL5WKsMT7XHdX1gAWW3-WaJo7p7R60uogWZEuBCYGsu+s5Q@mail.gmail.com>
- In-Reply-To
- <1483825623.31837.9.camel@kaarsemaker.net>
On Sat, Jan 7, 2017 at 4:47 PM, Dennis Kaarsemaker <dennis@kaarsemaker.net> wrote:
Show 18 quoted lines
> On Sat, 2017-01-07 at 07:50 -0500, John Szakmeister wrote: >> 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? > > If you do this with a commit object or tree object, fsck does complain. > I think it's sensible to do so for blob objects as well.
Also very good information. Thanks Dennis!
-John