import Data.Default in Common
This commit is contained in:
parent
0fd5f257d0
commit
e8c376e0ad
19 changed files with 48 additions and 54 deletions
|
@ -98,7 +98,7 @@ extractGitConfig r = GitConfig
|
|||
, annexDifferences = getDifferences r
|
||||
}
|
||||
where
|
||||
getbool k def = fromMaybe def $ getmaybebool k
|
||||
getbool k d = fromMaybe d $ getmaybebool k
|
||||
getmaybebool k = Git.Config.isTrue =<< getmaybe k
|
||||
getmayberead k = readish =<< getmaybe k
|
||||
getmaybe k = Git.Config.getMaybe k r
|
||||
|
@ -178,7 +178,7 @@ extractRemoteGitConfig r remotename = RemoteGitConfig
|
|||
, remoteGitConfig = Nothing
|
||||
}
|
||||
where
|
||||
getbool k def = fromMaybe def $ getmaybebool k
|
||||
getbool k d = fromMaybe d $ getmaybebool k
|
||||
getmaybebool k = Git.Config.isTrue =<< getmaybe k
|
||||
getmayberead k = readish =<< getmaybe k
|
||||
getmaybe k = mplus (Git.Config.getMaybe (key k) r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue