stub checksum backend
This commit is contained in:
parent
4631927a5c
commit
eb577ee37f
3 changed files with 20 additions and 2 deletions
18
BackendChecksum.hs
Normal file
18
BackendChecksum.hs
Normal 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
|
|
@ -21,4 +21,3 @@ moveToAnnex file key = return False
|
||||||
|
|
||||||
copyFromOtherRepo :: IO Key -> FilePath -> IO (Bool)
|
copyFromOtherRepo :: IO Key -> FilePath -> IO (Bool)
|
||||||
copyFromOtherRepo key file = return False
|
copyFromOtherRepo key file = return False
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,9 @@ import Annex
|
||||||
|
|
||||||
-- When adding a new backend, import it here and add it to the backends list.
|
-- When adding a new backend, import it here and add it to the backends list.
|
||||||
import qualified BackendFile
|
import qualified BackendFile
|
||||||
|
import qualified BackendChecksum
|
||||||
import qualified BackendUrl
|
import qualified BackendUrl
|
||||||
backends = [BackendFile.backend, BackendUrl.backend]
|
backends = [BackendFile.backend, BackendChecksum.backend, BackendUrl.backend]
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
repo <- repoTop
|
repo <- repoTop
|
||||||
|
|
Loading…
Reference in a new issue