summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-21 20:13:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-21 20:13:55 -0400
commitd1a411aad182c1fa1ed87b36eed554c0fe25c1cf (patch)
tree3e3c6ce8dc3a54401b715ea0123ac92be559c30f /Git
parent9af412760354034678c901c45164c0066a4cd949 (diff)
make runRepairOf run preRepair
This may be a little late, since a fsck has already been done, but it can't hurt.
Diffstat (limited to 'Git')
-rw-r--r--Git/Repair.hs7
1 files changed, 6 insertions, 1 deletions
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