diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-01 15:14:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-01 15:14:13 -0400 |
commit | 3bdf2d2052f3a194b3f72500ca71867fb22e1315 (patch) | |
tree | d4a076f7fc1ca255ded959779d99404525f7de78 /Git/Fsck.hs | |
parent | 3c7357ee388795149e922d344bdbf32e1d1d5810 (diff) | |
download | git-repair-3bdf2d2052f3a194b3f72500ca71867fb22e1315.tar.gz |
merge from git-annex
Note that the batchCommand stuff is not used in git-repair, so
configure does not need to check for nice, ionice, and nocache,
nor are they dependend on.
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 8555aa0..8d5b75b 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 |