use InodeCache when dropping a key to see if a pointer file can be safely reset
authorJoey Hess <joeyh@joeyh.name>
Wed, 9 Dec 2015 21:47:05 +0000 (17:47 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 9 Dec 2015 21:54:54 +0000 (17:54 -0400)
commitce73a96e4e5090e5b7618a564dc9405bec6c3de8
tree2c68cfdcac381743297ce44d9374702094542279
parent5e8c628d2e6e5c86b78765ca9836f267ee276cab
use InodeCache when dropping a key to see if a pointer file can be safely reset

The Keys database can hold multiple inode caches for a given key. One for
the annex object, and one for each pointer file, which may not be hard
linked to it.

Inode caches for a key are recorded when its content is added to the annex,
but only if it has known pointer files. This is to avoid the overhead of
maintaining the database when not needed.

When the smudge filter outputs a file's content, the inode cache is not
updated, because git's smudge interface doesn't let us write the file. So,
dropping will fall back to doing an expensive verification then. Ideally,
git's interface would be improved, and then the inode cache could be
updated then too.
Annex/Action.hs
Annex/Content.hs
Command/Smudge.hs
Database/Keys.hs
Utility/InodeCache.hs
doc/todo/smudge.mdwn