make linkAnnex detect when the file changes as it's being copied/linked in
authorJoey Hess <joeyh@joeyh.name>
Tue, 22 Dec 2015 19:20:03 +0000 (15:20 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 22 Dec 2015 19:20:03 +0000 (15:20 -0400)
commit439214094693bcaea0d2e460fba3f566e56027a0
treec4e5ba32e865c80567ba621e72073ebf5ea18d4f
parent8e9608d7f028ccd44e33fcf383bd8cc6974856f5
make linkAnnex detect when the file changes as it's being copied/linked in

This fixes a race where the modified file ended up in annex/objects, and
the InodeCache stored in the database was for the modified version, so
git-annex didn't know it had gotten modified.

The race could occur when the smudge filter was running; now it gets the
InodeCache before generating the Key, which avoids the race.
Annex/Content.hs
Command/Smudge.hs
Command/Unlock.hs
Upgrade/V5.hs