centralized "yes"/"no" parsing
This commit was sponsored by Jack Hill on Patreon.
This commit is contained in:
parent
6f0d8870df
commit
a9dd087074
7 changed files with 25 additions and 21 deletions
|
@ -102,3 +102,8 @@ setCrippledFileSystem :: Bool -> Annex ()
|
|||
setCrippledFileSystem b = do
|
||||
setConfig (annexConfig "crippledfilesystem") (Git.Config.boolConfig b)
|
||||
Annex.changeGitConfig $ \c -> c { annexCrippledFileSystem = b }
|
||||
|
||||
yesNo :: String -> Maybe Bool
|
||||
yesNo "yes" = Just True
|
||||
yesNo "no" = Just False
|
||||
yesNo _ = Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue