diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-20 15:37:29 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-20 15:37:29 -0400 |
commit | 9b5ab7d0118eff0b5d78d173b5a646cf9e89a891 (patch) | |
tree | 589265dd723d07280de1768e592a13d21c169fe1 /Git/Repair.hs | |
parent | 4a46c34cea8facf392054525f6b440d9237cc74e (diff) | |
download | git-repair-9b5ab7d0118eff0b5d78d173b5a646cf9e89a891.tar.gz |
deal with corrupted index again
Diffstat (limited to 'Git/Repair.hs')
-rw-r--r-- | Git/Repair.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Git/Repair.hs b/Git/Repair.hs index fa5c8c9..c21d35d 100644 --- a/Git/Repair.hs +++ b/Git/Repair.hs @@ -505,16 +505,18 @@ runRepairOf fsckresult forced referencerepo g = do if forced then continuerepairs s else unsuccessfulfinish s - Nothing -> do - if forced - then do + Nothing + | forced -> ifM (pure (repoIsLocalBare g) <||> checkIndex S.empty g) + ( do fsckresult' <- findBroken False False g case fsckresult' of Nothing -> do putStrLn "Unable to fully recover; cannot find missing objects." return (False, S.empty, []) Just stillmissing' -> continuerepairs stillmissing' - else unsuccessfulfinish S.empty + , corruptedindex + ) + | otherwise -> unsuccessfulfinish S.empty where continuerepairs stillmissing = do (remotebranches, goodcommits) <- removeTrackingBranches stillmissing emptyGoodCommits g |