lint
This commit is contained in:
parent
b327227ba5
commit
637b5feb45
26 changed files with 71 additions and 102 deletions
|
@ -24,12 +24,12 @@ repoExists = CommandCheck 0 ensureInitialized
|
|||
fromOpt :: CommandCheck
|
||||
fromOpt = CommandCheck 1 $ do
|
||||
v <- Annex.getState Annex.fromremote
|
||||
unless (v == Nothing) $ error "cannot use --from with this command"
|
||||
unless (isNothing v) $ error "cannot use --from with this command"
|
||||
|
||||
toOpt :: CommandCheck
|
||||
toOpt = CommandCheck 2 $ do
|
||||
v <- Annex.getState Annex.toremote
|
||||
unless (v == Nothing) $ error "cannot use --to with this command"
|
||||
unless (isNothing v) $ error "cannot use --to with this command"
|
||||
|
||||
dontCheck :: CommandCheck -> Command -> Command
|
||||
dontCheck check cmd = mutateCheck cmd $ \c -> filter (/= check) c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue