don't allow setting indirect mode on a crippled filesystem

This commit is contained in:
Joey Hess 2013-02-15 14:17:31 -04:00
parent 4da932a48f
commit 2e49a7e729
2 changed files with 21 additions and 9 deletions

View file

@ -16,6 +16,7 @@ import Config
import Annex.Direct
import Annex.Content
import Annex.CatFile
import Init
def :: [Command]
def = [notBareRepo $ command "indirect" paramNothing seek
@ -25,7 +26,13 @@ seek :: [CommandSeek]
seek = [withNothing start]
start :: CommandStart
start = ifM isDirect ( next perform, stop )
start = ifM isDirect
( ifM probeCrippledFileSystem
( error "This repository seems to be on a crippled filesystem, you must use direct mode."
, next perform
)
, stop
)
perform :: CommandPerform
perform = do