summaryrefslogtreecommitdiff
path: root/CmdLine
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-22 13:47:41 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-22 13:47:41 -0400
commit332f4ed6fbc930bf46984a512f300b29edc17d3b (patch)
treefa60e5a9676ef26f1b4e1eb6ec90ea9de7e95b00 /CmdLine
parent6cb031140c734b6c80e85a31b7ecbba7ddfb65a7 (diff)
Bug fix: Git config settings passed to git-annex -c did not always take effect.
When Config.setConfig runs, it throws away the old Repo and loads a new one. So, add an action to adjust the Repo so that -c settings will persist across that.
Diffstat (limited to 'CmdLine')
-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. -}