init: When annex.pidlock is set, skip lock probing.

This commit is contained in:
Joey Hess 2020-06-05 11:12:16 -04:00
parent 1d41ae5d2a
commit 2bff3b7c49
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 17 additions and 4 deletions

View file

@ -264,10 +264,12 @@ probeFifoSupport = do
#endif
checkLockSupport :: Annex ()
checkLockSupport = unlessM probeLockSupport $ do
warning "Detected a filesystem without POSIX fcntl lock support."
warning "Enabling annex.pidlock."
setConfig (annexConfig "pidlock") (Git.Config.boolConfig True)
checkLockSupport =
unlessM (annexPidLock <$> Annex.getGitConfig) $
unlessM probeLockSupport $ do
warning "Detected a filesystem without POSIX fcntl lock support."
warning "Enabling annex.pidlock."
setConfig (annexConfig "pidlock") (Git.Config.boolConfig True)
checkFifoSupport :: Annex ()
checkFifoSupport = unlessM probeFifoSupport $ do