all commands building except for assistant

also, changed ConfigValue to a newtype, and moved it into Git.Config.
This commit is contained in:
Joey Hess 2019-12-05 14:36:43 -04:00
parent 718fa83da6
commit c20f4704a7
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
40 changed files with 187 additions and 174 deletions

View file

@ -203,9 +203,9 @@ extractGitConfig r = GitConfig
getbool k d = fromMaybe d $ getmaybebool k
getmaybebool k = Git.Config.isTrue' =<< getmaybe' k
getmayberead k = readish =<< getmaybe k
getmaybe = fmap decodeBS' . getmaybe'
getmaybe = fmap fromConfigValue . getmaybe'
getmaybe' k = Git.Config.getMaybe k r
getlist k = map decodeBS' $ Git.Config.getList k r
getlist k = map fromConfigValue $ Git.Config.getList k r
getwords k = fromMaybe [] $ words <$> getmaybe k
configurable d Nothing = DefaultConfig d
@ -345,7 +345,7 @@ extractRemoteGitConfig r remotename = do
getbool k d = fromMaybe d $ getmaybebool k
getmaybebool k = Git.Config.isTrue' =<< getmaybe' k
getmayberead k = readish =<< getmaybe k
getmaybe = fmap decodeBS' . getmaybe'
getmaybe = fmap fromConfigValue . getmaybe'
getmaybe' k = mplus (Git.Config.getMaybe (key k) r)
(Git.Config.getMaybe (remotekey k) r)
getoptions k = fromMaybe [] $ words <$> getmaybe k