diff options
author | Joey Hess <joey@kitenet.net> | 2011-08-25 00:28:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-08-25 01:27:19 -0400 |
commit | 678726c10c13481c082743808a5188d28567e2b3 (patch) | |
tree | a5052eb5b20444e10d3f5d467281ef4c0f5975d1 /Git.hs | |
parent | 20259c2955e408a72e0960207fc8be4cbeec2e21 (diff) |
code simplification thanks to applicative functors
Diffstat (limited to 'Git.hs')
-rw-r--r-- | Git.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -63,6 +63,7 @@ module Git ( ) where import Control.Monad (unless, when) +import Control.Applicative import System.Directory import System.FilePath import System.Posix.Directory @@ -446,7 +447,7 @@ commit g message newref parentrefs = do pipeWriteRead g (map Param $ ["commit-tree", tree] ++ ps) message run g "update-ref" [Param newref, Param sha] where - ignorehandle a = return . snd =<< a + ignorehandle a = snd <$> a ps = concatMap (\r -> ["-p", r]) parentrefs {- Reads null terminated output of a git command (as enabled by the -z |