diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-02-06 17:08:14 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-02-06 17:16:41 -0400 |
commit | 0cb5a870007c8299f8788962bd7dfc0848794dc0 (patch) | |
tree | 43d9d70f436a42f055617df6abdf85972045476b /Command/Add.hs | |
parent | 7d9431ef1b0cff4eece3cd8fc03e429e391d724a (diff) |
The file matching options are now only accepted by commands that can actually use them.
Diffstat (limited to 'Command/Add.hs')
-rw-r--r-- | Command/Add.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Command/Add.hs b/Command/Add.hs index 51921fbc3..7faa7c80d 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -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" |