summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-05-16 16:08:20 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-05-16 16:08:20 -0400
commitf4b3a2aee0052962f3f82c03f137c62f17d64e18 (patch)
tree00ec330f89eebb9ded13689a82e7c2ab1d31c36a /Annex.hs
parentce4a677871eb33b5989005f6af209d6384d5f8a8 (diff)
factor out getRemoteGitConfig
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Annex.hs b/Annex.hs
index 8233e18b9..4cad1d5e2 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -28,6 +28,7 @@ module Annex (
getGitConfig,
changeGitConfig,
changeGitRepo,
+ getRemoteGitConfig,
withCurrentState,
) where
@@ -267,6 +268,13 @@ changeGitRepo r = changeState $ \s -> s
, gitconfig = extractGitConfig r
}
+{- Gets the RemoteGitConfig from a remote, given the Git.Repo for that
+ - remote. -}
+getRemoteGitConfig :: Git.Repo -> Annex RemoteGitConfig
+getRemoteGitConfig r = do
+ g <- gitRepo
+ return $ extractRemoteGitConfig g (Git.repoDescribe r)
+
{- Converts an Annex action into an IO action, that runs with a copy
- of the current Annex state.
-