From 332f4ed6fbc930bf46984a512f300b29edc17d3b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 Jan 2016 13:47:41 -0400 Subject: 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. --- CmdLine/GitAnnex/Options.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'CmdLine/GitAnnex') 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. -} -- cgit v1.2.3