diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-01 14:53:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-01 14:53:15 -0400 |
commit | 3ac91582743a295c23240b7dabe0cf605a38c4b1 (patch) | |
tree | f4d5e60947f3707bf88dbaca6be3d1ea6c7dadf1 /Git/Fsck.hs | |
parent | 6378b7460e4246ff98d690d24e33fa91995e108d (diff) |
assistant: Batch jobs are now run with ionice and nocache, when those commands are available.
Diffstat (limited to 'Git/Fsck.hs')
-rw-r--r-- | Git/Fsck.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Git/Fsck.hs b/Git/Fsck.hs index 8555aa0c1..8d5b75bbd 100644 --- a/Git/Fsck.hs +++ b/Git/Fsck.hs @@ -37,17 +37,16 @@ data FsckResults = FsckFoundMissing MissingObjects | FsckFailed -} findBroken :: Bool -> Repo -> IO FsckResults findBroken batchmode r = do + let (command, params) = ("git", fsckParams r) + (command', params') <- if batchmode + then toBatchCommand (command, params) + else return (command, params) (output, fsckok) <- processTranscript command' (toCommand params') Nothing let objs = findShas output badobjs <- findMissing objs r if S.null badobjs && not fsckok then return FsckFailed else return $ FsckFoundMissing badobjs - where - (command, params) = ("git", fsckParams r) - (command', params') - | batchmode = toBatchCommand (command, params) - | otherwise = (command, params) foundBroken :: FsckResults -> Bool foundBroken FsckFailed = True |