summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2015-07-08 15:08:02 -0400
committerJoey Hess <joeyh@joeyh.name>2015-07-08 15:08:02 -0400
commit6e5c1f8db3a4f2b1a3369c7a4152211ae985d68a (patch)
tree59ee2000c8b15f5f3afc008466096d820512acc1 /Command/Add.hs
parent3125da54f65c8b61ed0d4983ec36a29e529e5832 (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 689f2c6a54..270ac7f394 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