summaryrefslogtreecommitdiff
path: root/GitAnnex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'GitAnnex.hs')
-rw-r--r--GitAnnex.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/GitAnnex.hs b/GitAnnex.hs
index 270f5cce8..c807326ad 100644
--- a/GitAnnex.hs
+++ b/GitAnnex.hs
@@ -170,12 +170,10 @@ options = Option.common ++
, Option [] ["trust-glacier"] (NoArg (Annex.setFlag "trustglacier")) "Trust Amazon Glacier inventory"
] ++ Option.matcher
where
- setnumcopies v = Annex.changeState $
- \s -> s { Annex.forcenumcopies = readish v }
- setgitconfig :: String -> Annex ()
- setgitconfig v = do
- newg <- inRepo $ Git.Config.store v
- Annex.changeState $ \s -> s { Annex.repo = newg }
+ setnumcopies v = maybe noop
+ (\n -> Annex.changeConfig $ \c -> c { annexNumCopies = n })
+ (readish v)
+ setgitconfig v = Annex.changeGitRepo =<< inRepo (Git.Config.store v)
header :: String
header = "Usage: git-annex command [option ..]"