diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-11 17:19:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-11 17:19:55 -0400 |
commit | af82586adff96f18fe768e432f501c647401262f (patch) | |
tree | 20e7ec170661ab11010e39ce46657b69e7341e09 /Annex.hs | |
parent | de3dafae80f45af8db56dc95e11863f049cf3cb2 (diff) |
split up Types
Diffstat (limited to 'Annex.hs')
-rw-r--r-- | Annex.hs | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -8,11 +8,28 @@ import System.Directory import GitRepo import Utility import Locations -import Types import Backend import BackendList import LocationLog +-- git-annex's runtime state +data State = State { + repo :: GitRepo, + gitconfig :: GitConfig +} + +data GitConfig = GitConfig { + annex_name :: String, + annex_numcopies :: Int, + annex_backends :: [Backend] +} + +{- An annexed file's content is stored somewhere under .git/annex/ -} +annexDir :: GitRepo -> Key -> IO FilePath +annexDir repo key = do + dir <- gitDir repo + return $ dir ++ "/annex/" ++ key + {- On startup, examine the git repo, prepare it, and record state for - later. -} startAnnex :: IO State |