aboutsummaryrefslogtreecommitdiff
path: root/GitRepo.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-11 17:52:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-11 17:52:46 -0400
commitebc3fbe9ae2c5cc52332c77a92697c2517ce8263 (patch)
treef65c38ab3d452c0cde3d0d3b968c216f1ee30705 /GitRepo.hs
parentaf82586adff96f18fe768e432f501c647401262f (diff)
explicit exports
Diffstat (limited to 'GitRepo.hs')
-rw-r--r--GitRepo.hs22
1 files changed, 17 insertions, 5 deletions
diff --git a/GitRepo.hs b/GitRepo.hs
index c26f752ef..d01ba642b 100644
--- a/GitRepo.hs
+++ b/GitRepo.hs
@@ -1,6 +1,15 @@
{- git repository handling -}
-module GitRepo where
+module GitRepo (
+ GitRepo,
+ gitRepoCurrent,
+ gitRepoTop,
+ gitDir,
+ gitRelative,
+ gitConfigGet,
+ gitAdd,
+ gitAttributes
+) where
import Directory
import System.Directory
@@ -13,7 +22,7 @@ import Utility
-- a git repository
data GitRepo = GitRepo {
- top :: FilePath,
+ gitRepoTop :: FilePath,
bare :: Bool
}
@@ -23,10 +32,13 @@ gitRepo dir = do
b <- isBareRepo dir
return GitRepo {
- top = dir,
+ gitRepoTop = dir,
bare = b
}
+{- Short name used in here for top of repo. -}
+top = gitRepoTop
+
{- Path to a repository's gitattributes file. -}
gitAttributes :: GitRepo -> IO String
gitAttributes repo = do
@@ -73,8 +85,8 @@ gitConfigGet name defaultValue =
return ret
{- Finds the current git repository, which may be in a parent directory. -}
-currentRepo :: IO GitRepo
-currentRepo = do
+gitRepoCurrent :: IO GitRepo
+gitRepoCurrent = do
cwd <- getCurrentDirectory
top <- seekUp cwd isRepoTop
case top of