diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-23 12:21:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-23 12:21:59 -0400 |
commit | fb2ccfd60ff09c1b1d03838d42eba3c65fd7fb27 (patch) | |
tree | 6311388390b6bd61c98bd770460a0275584aa500 /Command | |
parent | 3aca9448cf014262e4ffd42c2ebf729d4f0a2282 (diff) |
add repair command
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Repair.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Command/Repair.hs b/Command/Repair.hs new file mode 100644 index 000000000..0e655588b --- /dev/null +++ b/Command/Repair.hs @@ -0,0 +1,25 @@ +{- git-annex command + - + - Copyright 2013 Joey Hess <joey@kitenet.net> + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module Command.Repair where + +import Common.Annex +import Command +import qualified Annex +import Git.RecoverRepository (runRecovery) + +def :: [Command] +def = [noCommit $ dontCheck repoExists $ + command "repair" paramNothing seek SectionMaintenance "recover broken git repository"] + +seek :: [CommandSeek] +seek = [withNothing start] + +start :: CommandStart +start = next $ next $ do + force <- Annex.getState Annex.force + inRepo $ runRecovery force |