aboutsummaryrefslogtreecommitdiff
path: root/Types/GitConfig.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-05-19 15:04:24 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-05-19 15:04:24 -0400
commitbbb2b798aec645f0c0754a5fb4e2fe8a126e2fd4 (patch)
tree5ed2e57712d389841257462d1057e9689905fb58 /Types/GitConfig.hs
parent11c97d173423bd5d3320124670ccc3b4c8675c06 (diff)
better memoize core.sharedrepository handling
It was memoized, but that was not used consistently. Move it to Types.GitConfig so it will auto-memoize.
Diffstat (limited to 'Types/GitConfig.hs')
-rw-r--r--Types/GitConfig.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs
index aafd97cb9..0f02a5270 100644
--- a/Types/GitConfig.hs
+++ b/Types/GitConfig.hs
@@ -16,6 +16,7 @@ import Common
import qualified Git
import qualified Git.Config
import qualified Git.Construct
+import Git.SharedRepository
import Utility.DataUnits
import Config.Cost
import Types.Distribution
@@ -58,6 +59,7 @@ data GitConfig = GitConfig
, annexStartupScan :: Bool
, annexHardLink :: Bool
, coreSymlinks :: Bool
+ , coreSharedRepository :: SharedRepository
, gcryptId :: Maybe String
, annexDifferences :: Differences
, annexUsedRefSpec :: Maybe RefSpec
@@ -97,6 +99,7 @@ extractGitConfig r = GitConfig
, annexStartupScan = getbool (annex "startupscan") True
, annexHardLink = getbool (annex "hardlink") False
, coreSymlinks = getbool "core.symlinks" True
+ , coreSharedRepository = getSharedRepository r
, gcryptId = getmaybe "core.gcrypt-id"
, annexDifferences = getDifferences r
, annexUsedRefSpec = either (const Nothing) Just . parseRefSpec