summaryrefslogtreecommitdiff
path: root/Git/Repair.hs
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-11-20 16:07:53 -0400
committerJoey Hess <joey@kitenet.net>2013-11-20 16:07:53 -0400
commitea8b6cdf35d2993a06d2ad546c8347bbab4410a0 (patch)
tree6bdea383057b9e00b69b04dab96c91868990e05e /Git/Repair.hs
parentd5e0cb2d1e58cf67d33b33cdeb0b9de443164255 (diff)
downloadgit-repair-ea8b6cdf35d2993a06d2ad546c8347bbab4410a0.tar.gz
remove fsck tryharder code
It turned out to be broken, and led to failures. 6d67245728bbbc07ad1eeaf5b3c49f64c6bbcd11 was a better fix for the problem that code tried to fix.
Diffstat (limited to 'Git/Repair.hs')
-rw-r--r--Git/Repair.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Git/Repair.hs b/Git/Repair.hs
index 7945bcb..4ae0008 100644
--- a/Git/Repair.hs
+++ b/Git/Repair.hs
@@ -76,7 +76,7 @@ cleanCorruptObjects mmissing r = check mmissing
else return $ Just bad
retry oldbad = do
putStrLn "Re-running git fsck to see if it finds more problems."
- v <- findBroken False True r
+ v <- findBroken False r
case v of
Nothing -> do
hPutStrLn stderr $ unwords
@@ -474,7 +474,7 @@ runRepair :: Bool -> Repo -> IO (Bool, MissingObjects, [Branch])
runRepair forced g = do
preRepair g
putStrLn "Running git fsck ..."
- fsckresult <- findBroken False False g
+ fsckresult <- findBroken False g
if foundBroken fsckresult
then runRepairOf fsckresult forced Nothing g
else do
@@ -508,7 +508,7 @@ runRepairOf fsckresult forced referencerepo g = do
Nothing
| forced -> ifM (pure (repoIsLocalBare g) <||> checkIndex S.empty g)
( do
- fsckresult' <- findBroken False False g
+ fsckresult' <- findBroken False g
case fsckresult' of
Nothing -> do
putStrLn "Unable to fully recover; cannot find missing objects."
@@ -556,7 +556,7 @@ runRepairOf fsckresult forced referencerepo g = do
nukeIndex g
-- The corrupted index can prevent fsck from finding other
-- problems, so re-run repair.
- fsckresult' <- findBroken False False g
+ fsckresult' <- findBroken False g
result <- runRepairOf fsckresult' forced referencerepo g
putStrLn "Removed the corrupted index file. You should look at what files are present in your working tree and git add them back to the index when appropriate."
return result