aboutsummaryrefslogtreecommitdiff
path: root/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-08-25 00:28:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-08-25 01:27:19 -0400
commit678726c10c13481c082743808a5188d28567e2b3 (patch)
treea5052eb5b20444e10d3f5d467281ef4c0f5975d1 /Git.hs
parent20259c2955e408a72e0960207fc8be4cbeec2e21 (diff)
code simplification thanks to applicative functors
Diffstat (limited to 'Git.hs')
-rw-r--r--Git.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Git.hs b/Git.hs
index 7155b2634..ab43504e1 100644
--- a/Git.hs
+++ b/Git.hs
@@ -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