summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Annex.hs b/Annex.hs
index 117bd2862..58040a271 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -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