diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-12-04 16:29:27 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-12-04 16:33:09 -0400 |
commit | 6e7468e9e142b379e0323d59f33c334b59c922fa (patch) | |
tree | 94f38e94c254bbc5165a6cbcf4d344d5e61a69af /Command/Direct.hs | |
parent | 9a765b7bd8ca28e3f94d9d7a11ce4d7162f700f1 (diff) |
don't let git-annex direct be run in a v6 repo
Diffstat (limited to 'Command/Direct.hs')
-rw-r--r-- | Command/Direct.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Command/Direct.hs b/Command/Direct.hs index 162780dd5..9cfd258eb 100644 --- a/Command/Direct.hs +++ b/Command/Direct.hs @@ -14,6 +14,7 @@ import qualified Git.LsFiles import qualified Git.Branch import Config import Annex.Direct +import Annex.Version cmd :: Command cmd = notBareRepo $ noDaemonRunning $ @@ -24,7 +25,10 @@ seek :: CmdParams -> CommandSeek seek = withNothing start start :: CommandStart -start = ifM isDirect ( stop , next perform ) +start = ifM versionSupportsDirectMode + ( ifM isDirect ( stop , next perform ) + , error "Direct mode is not suppported by this repository version. Use git-annex unlock instead." + ) perform :: CommandPerform perform = do |