make runRepairOf run preRepair
This may be a little late, since a fsck has already been done, but it can't hurt.
This commit is contained in:
parent
7d682dd844
commit
d490bbb891
1 changed files with 6 additions and 1 deletions
|
@ -434,13 +434,18 @@ runRepair forced g = do
|
||||||
putStrLn "Running git fsck ..."
|
putStrLn "Running git fsck ..."
|
||||||
fsckresult <- findBroken False g
|
fsckresult <- findBroken False g
|
||||||
if foundBroken fsckresult
|
if foundBroken fsckresult
|
||||||
then runRepairOf fsckresult forced Nothing g
|
then runRepair' fsckresult forced Nothing g
|
||||||
else do
|
else do
|
||||||
putStrLn "No problems found."
|
putStrLn "No problems found."
|
||||||
return (True, S.empty, [])
|
return (True, S.empty, [])
|
||||||
|
|
||||||
runRepairOf :: FsckResults -> Bool -> Maybe FilePath -> Repo -> IO (Bool, MissingObjects, [Branch])
|
runRepairOf :: FsckResults -> Bool -> Maybe FilePath -> Repo -> IO (Bool, MissingObjects, [Branch])
|
||||||
runRepairOf fsckresult forced referencerepo g = do
|
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
|
missing <- cleanCorruptObjects fsckresult g
|
||||||
stillmissing <- retrieveMissingObjects missing referencerepo g
|
stillmissing <- retrieveMissingObjects missing referencerepo g
|
||||||
case stillmissing of
|
case stillmissing of
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue