aboutsummaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
Diffstat (limited to 'Git')
-rw-r--r--Git/Command.hs4
-rw-r--r--Git/Construct.hs2
-rw-r--r--Git/UnionMerge.hs2
3 files changed, 4 insertions, 4 deletions
diff --git a/Git/Command.hs b/Git/Command.hs
index 50d4455fe..bb82d1339 100644
--- a/Git/Command.hs
+++ b/Git/Command.hs
@@ -79,5 +79,5 @@ pipeNullSplit params repo =
reap :: IO ()
reap = do
-- throws an exception when there are no child processes
- r <- catchDefaultIO (getAnyProcessStatus False True) Nothing
- maybe (return ()) (const reap) r
+ catchDefaultIO (getAnyProcessStatus False True) Nothing
+ >>= maybe noop (const reap)
diff --git a/Git/Construct.hs b/Git/Construct.hs
index 49905f818..3f3ea9747 100644
--- a/Git/Construct.hs
+++ b/Git/Construct.hs
@@ -48,7 +48,7 @@ import qualified Git.Url as Url
fromCurrent :: IO Repo
fromCurrent = do
r <- maybe fromCwd fromPath =<< getEnv "GIT_DIR"
- maybe (return ()) changeWorkingDirectory =<< getEnv "GIT_WORK_TREE"
+ maybe noop changeWorkingDirectory =<< getEnv "GIT_WORK_TREE"
unsetEnv "GIT_DIR"
unsetEnv "GIT_WORK_TREE"
return r
diff --git a/Git/UnionMerge.hs b/Git/UnionMerge.hs
index 90bbf5c4c..d68bb61ab 100644
--- a/Git/UnionMerge.hs
+++ b/Git/UnionMerge.hs
@@ -97,7 +97,7 @@ calc_merge :: CatFileHandle -> [String] -> Repo -> Streamer
calc_merge ch differ repo streamer = gendiff >>= go
where
gendiff = pipeNullSplit (map Param differ) repo
- go [] = return ()
+ go [] = noop
go (info:file:rest) = mergeFile info file ch repo >>=
maybe (go rest) (\l -> streamer l >> go rest)
go (_:[]) = error "calc_merge parse error"