factor out getRemoteGitConfig
This commit is contained in:
parent
dd6b32e9a2
commit
c34b5e09f8
6 changed files with 22 additions and 21 deletions
8
Annex.hs
8
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.
|
||||
-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue