don't let git-annex direct be run in a v6 repo
This commit is contained in:
parent
ccc49861ca
commit
e7f75b079d
6 changed files with 26 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue