git-annex/BackendChecksum.hs

20 lines
447 B
Haskell
Raw Normal View History

2010-10-10 19:27:49 +00:00
{- git-annex "checksum" backend
- -}
module BackendChecksum (backend) where
import qualified BackendFile
import Data.Digest.Pure.SHA
2010-10-11 21:52:46 +00:00
import BackendType
2010-10-11 21:19:55 +00:00
import GitRepo
2010-10-10 19:27:49 +00:00
-- based on BackendFile just with a different key type
backend = BackendFile.backend {
name = "checksum",
getKey = keyValue
}
2010-10-10 19:41:35 +00:00
-- checksum the file to get its key
keyValue :: GitRepo -> FilePath -> IO (Maybe Key)
keyValue k = error "checksum keyValue unimplemented" -- TODO