aboutsummaryrefslogtreecommitdiff
path: root/Types/GitConfig.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-11-12 17:47:31 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-11-12 17:50:34 -0400
commitba78630681ab7e987b70e67acaaf477912fe00bb (patch)
treeffe1202f212114fca535db22dba02de229d00330 /Types/GitConfig.hs
parent00fdc3063fe586cdce35ba8dbe2f1b024479522c (diff)
pid locking configuration and abstraction layer for git-annex
(not actually used anywhere yet)
Diffstat (limited to 'Types/GitConfig.hs')
-rw-r--r--Types/GitConfig.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs
index 9dde2b91d..1eb1f3227 100644
--- a/Types/GitConfig.hs
+++ b/Types/GitConfig.hs
@@ -1,6 +1,6 @@
{- git-annex configuration
-
- - Copyright 2012-2014 Joey Hess <id@joeyh.name>
+ - Copyright 2012-2015 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@@ -26,6 +26,7 @@ import Types.Difference
import Types.RefSpec
import Utility.HumanTime
import Utility.Gpg (GpgCmd, mkGpgCmd)
+import Utility.ThreadScheduler (Seconds(..))
{- Main git-annex settings. Each setting corresponds to a git-config key
- such as annex.foo -}
@@ -62,6 +63,8 @@ data GitConfig = GitConfig
, annexDifferences :: Differences
, annexUsedRefSpec :: Maybe RefSpec
, annexVerify :: Bool
+ , annexPidLock :: Bool
+ , annexPidLockTimeout :: Seconds
, coreSymlinks :: Bool
, coreSharedRepository :: SharedRepository
, gcryptId :: Maybe String
@@ -105,6 +108,9 @@ extractGitConfig r = GitConfig
, annexUsedRefSpec = either (const Nothing) Just . parseRefSpec
=<< getmaybe (annex "used-refspec")
, annexVerify = getbool (annex "verify") True
+ , annexPidLock = getbool (annex "pidlock") False
+ , annexPidLockTimeout = Seconds $ fromMaybe 300 $
+ getmayberead (annex "pidlocktimeout")
, coreSymlinks = getbool "core.symlinks" True
, coreSharedRepository = getSharedRepository r
, gcryptId = getmaybe "core.gcrypt-id"