summaryrefslogtreecommitdiff
path: root/CmdLine/GitAnnex/Options.hs
diff options
context:
space:
mode:
Diffstat (limited to 'CmdLine/GitAnnex/Options.hs')
-rw-r--r--CmdLine/GitAnnex/Options.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs
index 81d6434e0..0147c212c 100644
--- a/CmdLine/GitAnnex/Options.hs
+++ b/CmdLine/GitAnnex/Options.hs
@@ -87,9 +87,8 @@ gitAnnexGlobalOptions = commonGlobalOptions ++
where
setnumcopies n = Annex.changeState $ \s -> s { Annex.forcenumcopies = Just $ NumCopies n }
setuseragent v = Annex.changeState $ \s -> s { Annex.useragent = Just v }
- setgitconfig v = inRepo (Git.Config.store v)
- >>= pure . (\r -> r { gitGlobalOpts = gitGlobalOpts r ++ [Param "-c", Param v] })
- >>= Annex.changeGitRepo
+ setgitconfig v = Annex.adjustGitRepo $ \r -> Git.Config.store v $
+ r { gitGlobalOpts = gitGlobalOpts r ++ [Param "-c", Param v] }
setdesktopnotify v = Annex.changeState $ \s -> s { Annex.desktopnotify = Annex.desktopnotify s <> v }
{- Parser that accepts all non-option params. -}