block all commands that don't work in direct mode

I left status working in direct mode, although it doesn't show correct
stats for known annex keys.
This commit is contained in:
Joey Hess 2012-12-29 14:28:19 -04:00
parent 9f2150c7d3
commit 2ce736ac50
24 changed files with 41 additions and 40 deletions

View file

@ -23,7 +23,7 @@ import Utility.FileMode
import Config
def :: [Command]
def = [command "add" paramPaths seek "add files to annex"]
def = [notDirect $ command "add" paramPaths seek "add files to annex"]
{- Add acts on both files not checked into git yet, and unlocked files. -}
seek :: [CommandSeek]
@ -33,7 +33,7 @@ seek = [withFilesNotInGit start, withFilesUnlocked start]
- backend, and then moving it into the annex directory and setting up
- the symlink pointing to its content. -}
start :: FilePath -> CommandStart
start file = notBareRepo $ notDirect $ ifAnnexed file fixup add
start file = notBareRepo $ ifAnnexed file fixup add
where
add = do
s <- liftIO $ getSymbolicLinkStatus file