Revert "avoid double work in git-annex init"
authorJoey Hess <joeyh@joeyh.name>
Tue, 8 Jun 2021 13:11:24 +0000 (09:11 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 8 Jun 2021 13:11:24 +0000 (09:11 -0400)
commit2cb7b7b33634c29f6a9cba6aefbc237fe3b6d8c6
treefbbdf2396b6c1c8168f70a0927c86a0b1bcad2ea
parentc831a562f550e6ff93e081f555eced3a8a0d524f
Revert "avoid double work in git-annex init"

This reverts commit 0f10f208a7c76061b7d48aaa7ea0fa8e641cace3.

The implementation of this turns out to be unsafe; it can lead to a keys
db deadlock. scanAnnexedFiles injects a call to inAnnex into
reconcileStaged, but inAnnex sometimes needs to read from the keys db,
which will try to re-open it when it's in the process of being opened.
The exclusive lock of gitAnnexKeysDbLock will then deadlock.

This needs to be done in some other way...
Annex/WorkTree.hs
Database/Keys.hs