all commands building except for assistant
also, changed ConfigValue to a newtype, and moved it into Git.Config.
This commit is contained in:
parent
718fa83da6
commit
c20f4704a7
40 changed files with 187 additions and 174 deletions
|
@ -79,9 +79,9 @@ type GCryptId = String
|
|||
- which is stored in the repository (in encrypted form)
|
||||
- and cached in a per-remote gcrypt-id configuration setting. -}
|
||||
remoteRepoId :: Repo -> Maybe RemoteName -> Maybe GCryptId
|
||||
remoteRepoId r n = decodeBS' <$> getRemoteConfig "gcrypt-id" r n
|
||||
remoteRepoId r n = fromConfigValue <$> getRemoteConfig "gcrypt-id" r n
|
||||
|
||||
getRemoteConfig :: S.ByteString -> Repo -> Maybe RemoteName -> Maybe S.ByteString
|
||||
getRemoteConfig :: S.ByteString -> Repo -> Maybe RemoteName -> Maybe ConfigValue
|
||||
getRemoteConfig field repo remotename = do
|
||||
n <- remotename
|
||||
Config.getMaybe (remoteConfigKey field n) repo
|
||||
|
@ -96,8 +96,8 @@ getParticiantList globalconfigrepo repo remotename = KeyIds $ parse $ firstJust
|
|||
]
|
||||
where
|
||||
defaultkey = "gcrypt.participants"
|
||||
parse (Just "simple") = []
|
||||
parse (Just b) = words (decodeBS' b)
|
||||
parse (Just (ConfigValue "simple")) = []
|
||||
parse (Just (ConfigValue b)) = words (decodeBS' b)
|
||||
parse Nothing = []
|
||||
|
||||
remoteParticipantConfigKey :: RemoteName -> ConfigKey
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue