summaryrefslogtreecommitdiff
path: root/git-recover-repository.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-21 15:28:06 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-21 15:28:06 -0400
commit727566ad23efc6c36a4a4473b3299af913f6ce03 (patch)
tree8dd85a47703021db232b02e47d371037cb0715c3 /git-recover-repository.hs
parent1f7604f7d9df831012893a9ee2b4a8be20fe02ab (diff)
implemented removal of corrupt tracking branches
Oh, git, you made this so hard. Not determining if a branch pointed to some corrupt object, that was easy, but dealing with corrupt branches using git plumbing is a PITA.
Diffstat (limited to 'git-recover-repository.hs')
-rw-r--r--git-recover-repository.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-recover-repository.hs b/git-recover-repository.hs
index 6654057fa..66b1708f8 100644
--- a/git-recover-repository.hs
+++ b/git-recover-repository.hs
@@ -59,14 +59,14 @@ main = do
]
if forced
then do
- remotebranches <- Git.RecoverRepository.removeTrackingBranches stillmissing g
+ (remotebranches, goodcommits) <- Git.RecoverRepository.removeTrackingBranches stillmissing Git.RecoverRepository.emptyGoodCommits g
unless (null remotebranches) $
putStrLn $ unwords
[ "removed"
, show (length remotebranches)
, "remote tracking branches that referred to missing objects"
]
- localbranches <- Git.RecoverRepository.resetLocalBranches stillmissing g
+ localbranches <- Git.RecoverRepository.resetLocalBranches stillmissing goodcommits g
unless (null localbranches) $ do
putStrLn "Reset these local branches to old versions before the missing objects were committed:"
putStr $ unlines $ map show localbranches