From f4b3a2aee0052962f3f82c03f137c62f17d64e18 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 May 2014 16:08:20 -0400 Subject: factor out getRemoteGitConfig --- Annex.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Annex.hs') 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. - -- cgit v1.2.3