stub checksum backend

This commit is contained in:
Joey Hess 2010-10-10 15:27:49 -04:00
parent 4631927a5c
commit eb577ee37f
3 changed files with 20 additions and 2 deletions

18
BackendChecksum.hs Normal file
View file

@ -0,0 +1,18 @@
{- git-annex "checksum" backend
- -}
module BackendChecksum (backend) where
import Backend
import qualified BackendFile
import Data.Digest.Pure.SHA
-- based on BackendFile just with a different key type
backend = BackendFile.backend {
name = "checksum",
getKey = keyValue
}
--
keyValue :: FilePath -> IO (Maybe Key)
keyValue k = error "unimplemented" -- TODO

View file

@ -21,4 +21,3 @@ moveToAnnex file key = return False
copyFromOtherRepo :: IO Key -> FilePath -> IO (Bool)
copyFromOtherRepo key file = return False

View file

@ -8,8 +8,9 @@ import Annex
-- When adding a new backend, import it here and add it to the backends list.
import qualified BackendFile
import qualified BackendChecksum
import qualified BackendUrl
backends = [BackendFile.backend, BackendUrl.backend]
backends = [BackendFile.backend, BackendChecksum.backend, BackendUrl.backend]
main = do
repo <- repoTop