The file matching options are now only accepted by commands that can actually use them.

This commit is contained in:
Joey Hess 2015-02-06 17:08:14 -04:00
parent 52424dc382
commit 8066a1c3cc
24 changed files with 118 additions and 77 deletions

View file

@ -35,9 +35,11 @@ import Utility.Tmp
import Control.Exception (IOException)
cmd :: [Command]
cmd = [notBareRepo $ withOptions [includeDotFilesOption] $
command "add" paramPaths seek SectionCommon
"add files to annex"]
cmd = [notBareRepo $ withOptions addOptions $
command "add" paramPaths seek SectionCommon "add files to annex"]
addOptions :: [Option]
addOptions = includeDotFilesOption : fileMatchingOptions
includeDotFilesOption :: Option
includeDotFilesOption = flagOption [] "include-dotfiles" "don't skip dotfiles"