diff options
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Config.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Git/Config.hs b/Git/Config.hs index 8190a62ad..38b9ade45 100644 --- a/Git/Config.hs +++ b/Git/Config.hs @@ -20,6 +20,10 @@ import qualified Git.Construct get :: String -> String -> Repo -> String get key defaultValue repo = M.findWithDefault defaultValue key (config repo) +{- Returns a list with each line of a multiline config setting. -} +getList :: String -> Repo -> [String] +getList key repo = M.findWithDefault [] key (fullconfig repo) + {- Returns a single git config setting, if set. -} getMaybe :: String -> Repo -> Maybe String getMaybe key repo = M.lookup key (config repo) |