summaryrefslogtreecommitdiff
path: root/Command/Import.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/Import.hs
parent8879c96d157f06bbd2372064251676b7927ce38e (diff)
convert all commands to work with optparse-applicative
Still no options though.
Diffstat (limited to 'Command/Import.hs')
-rw-r--r--Command/Import.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Command/Import.hs b/Command/Import.hs
index 6bc330fca..8d09f8478 100644
--- a/Command/Import.hs
+++ b/Command/Import.hs
@@ -23,8 +23,10 @@ import Types.TrustLevel
import Logs.Trust
cmd :: Command
-cmd = withOptions opts $ notBareRepo $ command "import" paramPaths seek
- SectionCommon "move and add files from outside git working copy"
+cmd = withOptions opts $ notBareRepo $
+ command "import" SectionCommon
+ "move and add files from outside git working copy"
+ paramPaths (withParams seek)
opts :: [Option]
opts = duplicateModeOptions ++ fileMatchingOptions
@@ -60,7 +62,7 @@ getDuplicateMode = go . catMaybes <$> mapM getflag [minBound..maxBound]
go ms = error $ "cannot combine " ++
unwords (map (optionParam . fromJust . associatedOption) ms)
-seek :: CommandSeek
+seek :: CmdParams -> CommandSeek
seek ps = do
mode <- getDuplicateMode
repopath <- liftIO . absPath =<< fromRepo Git.repoPath