avoid update-index race

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2018-08-17 16:03:40 -04:00
parent 82c5dd8a01
commit 54d49eeac8
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 91 additions and 46 deletions

View file

@ -270,7 +270,7 @@ preventCommits :: (CommitsPrevented -> Annex a) -> Annex a
preventCommits = bracket setup cleanup
where
setup = do
lck <- fromRepo indexFileLock
lck <- fromRepo $ indexFileLock . indexFile
liftIO $ Git.LockFile.openLock lck
cleanup = liftIO . Git.LockFile.closeLock