summaryrefslogtreecommitdiff
path: root/BackendChecksum.hs
blob: 7b8d2c281ee0b775ed6cd7efb73b009bcd756ebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{- git-annex "checksum" backend
 - -}

module BackendChecksum (backend) where

import Backend
import GitRepo
import qualified BackendFile
import Data.Digest.Pure.SHA

-- based on BackendFile just with a different key type
backend = BackendFile.backend {
	name = "checksum",
	getKey = keyValue
}

-- checksum the file to get its key
keyValue :: GitRepo -> FilePath -> IO (Maybe Key)
keyValue k = error "checksum keyValue unimplemented" -- TODO