git-annex/BackendChecksum.hs

19 lines
426 B
Haskell
Raw Normal View History

2010-10-10 19:27:49 +00:00
{- git-annex "checksum" backend
- -}
module BackendChecksum (backend) where
2010-10-10 22:05:37 +00:00
import Types
2010-10-10 19:27:49 +00:00
import qualified BackendFile
import Data.Digest.Pure.SHA
-- 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