From d1a411aad182c1fa1ed87b36eed554c0fe25c1cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 21 Nov 2013 20:13:55 -0400 Subject: make runRepairOf run preRepair This may be a little late, since a fsck has already been done, but it can't hurt. --- Git/Repair.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Git/Repair.hs b/Git/Repair.hs index 73f141cac..2fe9f3896 100644 --- a/Git/Repair.hs +++ b/Git/Repair.hs @@ -434,13 +434,18 @@ runRepair forced g = do putStrLn "Running git fsck ..." fsckresult <- findBroken False g if foundBroken fsckresult - then runRepairOf fsckresult forced Nothing g + then runRepair' fsckresult forced Nothing g else do putStrLn "No problems found." return (True, S.empty, []) runRepairOf :: FsckResults -> Bool -> Maybe FilePath -> Repo -> IO (Bool, MissingObjects, [Branch]) runRepairOf fsckresult forced referencerepo g = do + preRepair g + runRepair' fsckresult forced referencerepo g + +runRepair' :: FsckResults -> Bool -> Maybe FilePath -> Repo -> IO (Bool, MissingObjects, [Branch]) +runRepair' fsckresult forced referencerepo g = do missing <- cleanCorruptObjects fsckresult g stillmissing <- retrieveMissingObjects missing referencerepo g case stillmissing of -- cgit v1.2.3