diff options
Diffstat (limited to 'Annex.hs')
-rw-r--r-- | Annex.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -28,6 +28,7 @@ module Annex ( gitRepo, inRepo, fromRepo, + calcRepo, getGitConfig, changeGitConfig, changeGitRepo, @@ -203,6 +204,11 @@ inRepo a = liftIO . a =<< gitRepo fromRepo :: (Git.Repo -> a) -> Annex a fromRepo a = a <$> gitRepo +calcRepo :: (Git.Repo -> GitConfig -> IO a) -> Annex a +calcRepo a = do + s <- getState id + liftIO $ a (repo s) (gitconfig s) + {- Gets the GitConfig settings. -} getGitConfig :: Annex GitConfig getGitConfig = getState gitconfig |