From 84ac8c58db30637db4fb88566530b6293f12dab0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Apr 2012 01:13:09 -0400 Subject: Add annex.httpheaders and annex.httpheader-command config settings Allow custom headers to be sent with all HTTP requests. (Requested by the Internet Archive) --- Git/Config.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Git/Config.hs') 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) -- cgit v1.2.3