diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-11 23:27:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-11 23:27:48 -0400 |
commit | 16b551726d9d846a51656b7b1d4736a3b1b438f4 (patch) | |
tree | c1d3b0b39399c6547e4dd86a8bb811ea629ced2f /GitRepo.hs | |
parent | cd1e39b127e96298685906e455ff186312d08029 (diff) |
minor
Diffstat (limited to 'GitRepo.hs')
-rw-r--r-- | GitRepo.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/GitRepo.hs b/GitRepo.hs index 7ae6584dd..2f9084ff7 100644 --- a/GitRepo.hs +++ b/GitRepo.hs @@ -112,10 +112,11 @@ gitConfigRead repo = do c <- gitPipeRead repo ["config", "--list"] return repo { config = Map.fromList $ parse c } where - parse s = map ( \l -> (key l, val l) ) $ lines s - keyval l = split sep l :: [String] + parse s = map pair $ lines s + pair l = (key l, val l) key l = (keyval l) !! 0 val l = join sep $ drop 1 $ keyval l + keyval l = split sep l :: [String] sep = "=" {- Returns a single git config setting, or a default value if not set. -} |