diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-13 16:21:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-13 16:21:50 -0400 |
commit | f87c5ed9496f50646d9f5e8be540f8bc059db242 (patch) | |
tree | 08c5bfede3fb07573a6859b576a45a3ac84d3a1b /Locations.hs | |
parent | e28ff5bdaf7ce56c0c928904ff883c1e2cd093de (diff) |
copying almost working
Diffstat (limited to 'Locations.hs')
-rw-r--r-- | Locations.hs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Locations.hs b/Locations.hs index 304ca060e..d6d7d4248 100644 --- a/Locations.hs +++ b/Locations.hs @@ -21,18 +21,18 @@ gitStateDir :: GitRepo -> FilePath gitStateDir repo = (gitWorkTree repo) ++ "/" ++ stateLoc ++ "/" {- An annexed file's content is stored in - - .git/annex/<backend>/<key> ; this allows deriving the key and backend - - by looking at the symlink to it. -} -annexLocation :: State -> Backend -> Key -> FilePath -annexLocation state backend key = - (gitWorkTree $ repo state) ++ "/" ++ - (annexLocationRelative state backend key) + - /path/to/repo/.git/annex/<backend>/<key> + - + - (That allows deriving the key and backend by looking at the symlink to it.) + -} +annexLocation :: GitRepo -> Backend -> Key -> FilePath +annexLocation r backend key = + (gitWorkTree r) ++ "/" ++ (annexLocationRelative r backend key) {- Annexed file's location relative to the gitWorkTree -} -annexLocationRelative :: State -> Backend -> Key -> FilePath -annexLocationRelative state backend key = - gitDir (repo state) ++ "/annex/" ++ (name backend) ++ - "/" ++ (keyFile key) +annexLocationRelative :: GitRepo -> Backend -> Key -> FilePath +annexLocationRelative r backend key = + gitDir r ++ "/annex/" ++ (name backend) ++ "/" ++ (keyFile key) {- Converts a key into a filename fragment. - |