diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-09-30 13:36:50 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-09-30 13:36:50 -0400 |
commit | ff84a7d05050da889da5e48b85067186616da80f (patch) | |
tree | c6b3263d55e289ab211f28d94987142cbe54b047 /Remote/External | |
parent | 9bdcbd84e505a91b54c3a8193f877f7b2d721c63 (diff) |
move externalConfig into ExternalState
Groundwork to having multiple processes running at once for an external
special remote; each needs its own externalConfig.
Diffstat (limited to 'Remote/External')
-rw-r--r-- | Remote/External/Types.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Remote/External/Types.hs b/Remote/External/Types.hs index be608d4e5..8098826b2 100644 --- a/Remote/External/Types.hs +++ b/Remote/External/Types.hs @@ -52,8 +52,7 @@ data External = External , externalState :: TMVar ExternalState -- Empty when a remote is in use. , externalLock :: TMVar ExternalLock - -- Never left empty. - , externalConfig :: TMVar RemoteConfig + , externalDefaultConfig :: RemoteConfig , externalGitConfig :: RemoteGitConfig } @@ -63,7 +62,7 @@ newExternal externaltype u c gc = liftIO $ External <*> pure u <*> atomically newEmptyTMVar <*> atomically (newTMVar ExternalLock) - <*> atomically (newTMVar c) + <*> pure c <*> pure gc type ExternalType = String @@ -73,6 +72,8 @@ data ExternalState = ExternalState , externalReceive :: Handle , externalShutdown :: IO () , externalPrepared :: PrepareStatus + -- Never left empty. + , externalConfig :: TMVar RemoteConfig } data PrepareStatus = Unprepared | Prepared | FailedPrepare ErrorMsg |