explicit exports

This commit is contained in:
Joey Hess 2010-10-11 17:52:46 -04:00
parent af82586adf
commit ebc3fbe9ae
11 changed files with 58 additions and 39 deletions

View file

@ -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