summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-11-20 15:14:20 -0400
committerJoey Hess <joey@kitenet.net>2013-11-20 15:14:20 -0400
commit6d67245728bbbc07ad1eeaf5b3c49f64c6bbcd11 (patch)
treefb9fbeb6820e46eef37270a60704947e5aad4bed /Utility
parentc2cd79e09b5aad1d634c58f5a130654649e25c49 (diff)
downloadgit-repair-6d67245728bbbc07ad1eeaf5b3c49f64c6bbcd11.tar.gz
try to recover even if git fsck cannot be coaxed to tell us any bad objects
Sometimes git fsck outputs no shas even with --verbose, but fails, due to badly corrupt objects. The best thing to do in this situation is to try to pull and rsync from remotes, hoping that the bad objects will be overwritten.
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Tmp.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utility/Tmp.hs b/Utility/Tmp.hs
index 186cd12..3770654 100644
--- a/Utility/Tmp.hs
+++ b/Utility/Tmp.hs
@@ -62,7 +62,7 @@ withTmpDirIn :: FilePath -> Template -> (FilePath -> IO a) -> IO a
withTmpDirIn tmpdir template = bracket create remove
where
remove d = whenM (doesDirectoryExist d) $
- removeDirectoryRecursive d
+ return () -- removeDirectoryRecursive d
create = do
createDirectoryIfMissing True tmpdir
makenewdir (tmpdir </> template) (0 :: Int)