This commit is contained in:
Joey Hess 2010-10-12 20:20:59 -04:00
parent b7858ada03
commit 490eb66be4
2 changed files with 4 additions and 6 deletions

View file

@ -9,9 +9,6 @@
- This key can later be used to retrieve the file's content (its value). This - This key can later be used to retrieve the file's content (its value). This
- key generation must be stable for a given file content, name, and size. - key generation must be stable for a given file content, name, and size.
- -
- The mapping from filename to its key is stored in the .git-annex directory,
- in a file named `$filename.$backend`
-
- Multiple pluggable backends are supported, and more than one can be used - Multiple pluggable backends are supported, and more than one can be used
- to store different files' contents in a given repository. - to store different files' contents in a given repository.
- -} - -}

View file

@ -30,9 +30,10 @@ keyFile key = replace "/" "%" $ replace "%" "%%" key
annexLocation :: State -> Key -> FilePath annexLocation :: State -> Key -> FilePath
annexLocation state key = gitDir (repo state) ++ "/annex/" ++ (keyFile key) annexLocation state key = gitDir (repo state) ++ "/annex/" ++ (keyFile key)
{- Name of state file that holds the key for an annexed file, {- The mapping from filename to its key is stored in the .git-annex directory,
- using a given backend. -} - in a file named `key/$filename.$backend` -}
backendFile :: State -> Backend -> FilePath -> String backendFile :: State -> Backend -> FilePath -> String
backendFile state backend file = backendFile state backend file =
gitStateDir (repo state) ++ (gitRelative (repo state) file) ++ gitStateDir (repo state) ++ "key/" ++
(gitRelative (repo state) file) ++
"." ++ (name backend) "." ++ (name backend)