summaryrefslogtreecommitdiff
path: root/CmdLine/GitAnnex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-06-16 16:50:03 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-06-16 16:50:03 -0400
commit712deee42b122f0ec07866e6bd7770343cee971c (patch)
tree4eb2525edc3cf17d2f6710c7ce52eb28d423f28b /CmdLine/GitAnnex
parentc9d9fca2ed950b32be992d5ac2a055c8246f52a5 (diff)
sync: Add support for --all and --unused.
Diffstat (limited to 'CmdLine/GitAnnex')
-rw-r--r--CmdLine/GitAnnex/Options.hs16
1 files changed, 9 insertions, 7 deletions
diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs
index 46d593618..320268f6a 100644
--- a/CmdLine/GitAnnex/Options.hs
+++ b/CmdLine/GitAnnex/Options.hs
@@ -53,13 +53,15 @@ gitAnnexOptions = commonOptions ++
-- Options for matching on annexed keys, rather than work tree files.
keyOptions :: [Option]
-keyOptions =
- [ Option ['A'] ["all"] (NoArg (Annex.setFlag "all"))
- "operate on all versions of all files"
- , Option ['U'] ["unused"] (NoArg (Annex.setFlag "unused"))
- "operate on files found by last run of git-annex unused"
- , keyOption
- ]
+keyOptions = [ allOption, unusedOption, keyOption]
+
+allOption :: Option
+allOption = Option ['A'] ["all"] (NoArg (Annex.setFlag "all"))
+ "operate on all versions of all files"
+
+unusedOption :: Option
+unusedOption = Option ['U'] ["unused"] (NoArg (Annex.setFlag "unused"))
+ "operate on files found by last run of git-annex unused"
keyOption :: Option
keyOption = Option [] ["key"] (ReqArg (Annex.setField "key") paramKey)