summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2021-01-11 21:58:15 -0400
committerJoey Hess <joeyh@joeyh.name>2021-01-11 21:58:15 -0400
commit526f23761b62ac62ae07a49d79143cf610ce3bae (patch)
tree508375fac532a40ae862383f9b601bcc50ccc6c6
parenta089fba4eaab9ec27b68656e58260c70be26f080 (diff)
downloadgit-repair-526f23761b62ac62ae07a49d79143cf610ce3bae.tar.gz
Improve output to not give the impression it's stalled running fsck when it's found a problem and is working to repair it.
-rw-r--r--CHANGELOG2
-rw-r--r--Git/Repair.hs9
2 files changed, 9 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 4aee15d..2982a9e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
git-repair (1.20210111) UNRELEASED; urgency=medium
+ * Improve output to not give the impression it's stalled running fsck
+ when it's found a problem and is working to repair it.
* Merge from git-annex.
* Makefile: Support building with cabal 3.0.
diff --git a/Git/Repair.hs b/Git/Repair.hs
index ea682a2..034d7e9 100644
--- a/Git/Repair.hs
+++ b/Git/Repair.hs
@@ -464,14 +464,19 @@ runRepair removablebranch forced g = do
putStrLn "Running git fsck ..."
fsckresult <- findBroken False g
if foundBroken fsckresult
- then runRepair' removablebranch fsckresult forced Nothing g
+ then do
+ putStrLn "Fsck found problems, attempting repair."
+ runRepair' removablebranch fsckresult forced Nothing g
else do
+ putStrLn "Fsck found no problems. Checking for broken branches."
bad <- badBranches S.empty g
if null bad
then do
putStrLn "No problems found."
return (True, [])
- else runRepair' removablebranch fsckresult forced Nothing g
+ else do
+ putStrLn "Found problems, attempting repair."
+ runRepair' removablebranch fsckresult forced Nothing g
runRepairOf :: FsckResults -> (Ref -> Bool) -> Bool -> Maybe FilePath -> Repo -> IO (Bool, [Branch])
runRepairOf fsckresult removablebranch forced referencerepo g = do