summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-08 15:08:02 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-08 15:08:02 -0400
commite7e61fb6cbe5455ded9bb550a64121223c099fc2 (patch)
tree003a99697256ea516ad40f9fbdb854996b58c0cd /Command/Add.hs
parent8879c96d157f06bbd2372064251676b7927ce38e (diff)
convert all commands to work with optparse-applicative
Still no options though.
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index 689f2c6a5..270ac7f39 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -36,8 +36,8 @@ import Control.Exception (IOException)
cmd :: Command
cmd = notBareRepo $ withOptions addOptions $
- command "add" paramPaths SectionCommon "add files to annex"
- (commandParser seek)
+ command "add" SectionCommon "add files to annex"
+ paramPaths (withParams seek)
addOptions :: [Option]
addOptions = includeDotFilesOption : fileMatchingOptions
@@ -71,8 +71,8 @@ startSmall file = do
performAdd :: FilePath -> CommandPerform
performAdd file = do
- params <- forceParams
- Annex.Queue.addCommand "add" (params++[Param "--"]) [file]
+ ps <- forceParams
+ Annex.Queue.addCommand "add" (ps++[Param "--"]) [file]
next $ return True
{- The add subcommand annexes a file, generating a key for it using a
@@ -279,8 +279,8 @@ addLink :: FilePath -> Key -> Maybe InodeCache -> Annex ()
addLink file key mcache = ifM (coreSymlinks <$> Annex.getGitConfig)
( do
_ <- link file key mcache
- params <- forceParams
- Annex.Queue.addCommand "add" (params++[Param "--"]) [file]
+ ps <- forceParams
+ Annex.Queue.addCommand "add" (ps++[Param "--"]) [file]
, do
l <- link file key mcache
addAnnexLink l file