From d3aa5938993372daea5c38c28d2b84b9112f1fc3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 20 Nov 2013 16:14:12 -0400 Subject: fix reversion of bad fsck tryharder code --- Git/Fsck.hs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Git/Fsck.hs b/Git/Fsck.hs index 9c62ae0..85e6054 100644 --- a/Git/Fsck.hs +++ b/Git/Fsck.hs @@ -41,13 +41,10 @@ findBroken :: Bool -> Repo -> IO FsckResults findBroken batchmode r = do (output, fsckok) <- processTranscript command' (toCommand params') Nothing let objs = findShas output - if fsckok - then do - badobjs <- findMissing objs r - if S.null badobjs && not fsckok - then return Nothing - else return $ Just badobjs - else return Nothing + badobjs <- findMissing objs r + if S.null badobjs && not fsckok + then return Nothing + else return $ Just badobjs where (command, params) = ("git", fsckParams r) (command', params') -- cgit v1.2.3