summaryrefslogtreecommitdiff
path: root/CmdLine/GitAnnex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-10 02:03:03 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-10 02:03:03 -0400
commitccd76ebf641ad481e549da97c85f73101a3149fd (patch)
tree254f0d644e4998ff73046de74fa4fa4f91735ec8 /CmdLine/GitAnnex
parent56c0bf6c690ffddc4ac561393f4cd21d087b7ddb (diff)
wired up global options
Note that I ran into a problem where parsing the global options looped forever, eating memory. It was somehow caused by stacking combineGlobalSetters inside a combineGlobalSetters. Maybe due to both using "many"? Anyway, changed things to avoid that.
Diffstat (limited to 'CmdLine/GitAnnex')
-rw-r--r--CmdLine/GitAnnex/Options.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs
index 8bc96a14d..bb002a103 100644
--- a/CmdLine/GitAnnex/Options.hs
+++ b/CmdLine/GitAnnex/Options.hs
@@ -29,10 +29,9 @@ import CmdLine.Usage
-- Global options that are accepted by all git-annex sub-commands,
-- although not always used.
-gitAnnexGlobalOptions :: Parser GlobalSetter
-gitAnnexGlobalOptions = globalSetters
- [ commonGlobalOptions
- , globalSetter setnumcopies $ option auto
+gitAnnexGlobalOptions :: [Parser GlobalSetter]
+gitAnnexGlobalOptions = commonGlobalOptions ++
+ [ globalSetter setnumcopies $ option auto
( long "numcopies" <> short 'N' <> metavar paramNumber
<> help "override default number of copies"
)