summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-08-17 11:21:13 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-08-17 11:21:13 -0400
commitd7337c96cf31ef0a0ff45db399cd787c778fdd28 (patch)
tree73910f018b18fb9c679bd36e6fa30ea5d55a3b01 /Remote
parent29826eaa3d217a722a291b30fba5f9eda98ff518 (diff)
refactor
Diffstat (limited to 'Remote')
-rw-r--r--Remote/Helper/Special.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs
index 956d48273..60bf123a5 100644
--- a/Remote/Helper/Special.hs
+++ b/Remote/Helper/Special.hs
@@ -36,6 +36,7 @@ import Common.Annex
import Types.StoreRetrieve
import Types.Remote
import Crypto
+import Config
import Config.Cost
import Utility.Metered
import Remote.Helper.Chunked as X
@@ -44,7 +45,6 @@ import Remote.Helper.Messages
import Annex.Content
import Messages.Progress
import qualified Git
-import qualified Git.Command
import qualified Git.Construct
import qualified Data.ByteString.Lazy as L
@@ -66,13 +66,10 @@ findSpecialRemotes s = do
{- Sets up configuration for a special remote in .git/config. -}
gitConfigSpecialRemote :: UUID -> RemoteConfig -> String -> String -> Annex ()
gitConfigSpecialRemote u c k v = do
- set ("annex-"++k) v
- set ("annex-uuid") (fromUUID u)
+ setConfig (remoteConfig remotename k) v
+ setConfig (remoteConfig remotename "uuid") (fromUUID u)
where
- set a b = inRepo $ Git.Command.run
- [Param "config", Param (configsetting a), Param b]
remotename = fromJust (M.lookup "name" c)
- configsetting s = "remote." ++ remotename ++ "." ++ s
-- Use when nothing needs to be done to prepare a helper.
simplyPrepare :: helper -> Preparer helper