From a8643ca44c49cc945f0ecb0e02c2946595415054 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Dec 2011 13:05:47 -0400 Subject: refactor --- Git/Config.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Git/Config.hs') diff --git a/Git/Config.hs b/Git/Config.hs index 1fe948499..8d7963994 100644 --- a/Git/Config.hs +++ b/Git/Config.hs @@ -58,9 +58,9 @@ parse :: String -> M.Map String String parse [] = M.empty parse s -- --list output will have an = in the first line - | '=' `elem` head ls = M.fromList $ map (separate (== '=')) ls + | '=' `elem` head ls = sep '=' ls -- --null --list output separates keys from values with newlines - | otherwise = M.fromList $ map (separate (== '\n')) $ split "\0" s + | otherwise = sep '\n' $ split "\0" s where - pair = separate (== '=') ls = lines s + sep c = M.fromList . map (separate (== c)) -- cgit v1.2.3