summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Git/Repair.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Git/Repair.hs b/Git/Repair.hs
index 73f141c..2fe9f38 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