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.
This commit is contained in:
Joey Hess 2015-07-10 02:03:03 -04:00
parent adb9fddfdd
commit b66a2d6c5b
5 changed files with 25 additions and 24 deletions

View file

@ -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"
)