On Wed, Jun 11, 2008 at 01:47:18AM +0000, Linus Torvalds wrote:
Could this be the source of a problem we often meet at work ? Let me
try to describe it.
We work with our git repositories (storages I should say) on NFS
homes, with workdirs on a local directory (NFS homes are backuped daily,
hence everything commited get backuped, and developers have shorter
compilation times thanks to the local FS). I don't think the workdir use
is relevant because I use it almost the same without NFS and haven't any
issues, but I mention it just in case.
Quite often, when people commit, they have corrupt repositories. The
symptom is a `cannot read <sha1>` error message (or many at times). The
usual way to "fix" it is to git fsck, and git reset (because after the
fsck the index is totally screwed and all local files are marked new),
and usually everything is fine then.
This is not really a hard corruption, and it's really hard to
reproduce, I don't know why it happens, and I wonder if this patch could
help, or if it's unrelated. I can only bring speculations as it's really
hard to reproduce, and it quite depends on the load of the NFS server :/