diff options
Diffstat (limited to 'Remote/Helper/Special.hs')
-rw-r--r-- | Remote/Helper/Special.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs index 38f24eb37..6cea17034 100644 --- a/Remote/Helper/Special.hs +++ b/Remote/Helper/Special.hs @@ -23,16 +23,16 @@ findSpecialRemotes s = do return $ map construct $ remotepairs g where remotepairs r = M.toList $ M.filterWithKey match $ Git.configMap r - construct (k,_) = Git.repoRemoteNameFromKey Git.repoFromUnknown k + construct (k,_) = Git.repoRemoteNameFromKey k Git.repoFromUnknown match k _ = startswith "remote." k && endswith (".annex-"++s) k {- Sets up configuration for a special remote in .git/config. -} gitConfigSpecialRemote :: UUID -> RemoteConfig -> String -> String -> Annex () gitConfigSpecialRemote u c k v = do - g <- gitRepo - liftIO $ do - Git.run g "config" [Param (configsetting $ "annex-"++k), Param v] - Git.run g "config" [Param (configsetting "annex-uuid"), Param $ fromUUID u] + set ("annex-"++k) v + set ("annex-uuid") (fromUUID u) where + set a b = inRepo $ Git.run "config" + [Param (configsetting a), Param b] remotename = fromJust (M.lookup "name" c) configsetting s = "remote." ++ remotename ++ "." ++ s |