diff options
author | 2010-10-10 15:27:49 -0400 | |
---|---|---|
committer | 2010-10-10 15:27:49 -0400 | |
commit | eb577ee37ff1d631aa3580a235b9954043d0fb27 (patch) | |
tree | 6fe1aa8602861298bc34e7b00429f4d3b5e4551e | |
parent | 4631927a5c7b14605725f1c6f272fee19d8b4318 (diff) |
stub checksum backend
-rw-r--r-- | BackendChecksum.hs | 18 | ||||
-rw-r--r-- | BackendFile.hs | 1 | ||||
-rw-r--r-- | git-annex.hs | 3 |
3 files changed, 20 insertions, 2 deletions
diff --git a/BackendChecksum.hs b/BackendChecksum.hs new file mode 100644 index 000000000..267f8099c --- /dev/null +++ b/BackendChecksum.hs @@ -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 diff --git a/BackendFile.hs b/BackendFile.hs index 324a4d8cd..dd6ff595a 100644 --- a/BackendFile.hs +++ b/BackendFile.hs @@ -21,4 +21,3 @@ moveToAnnex file key = return False copyFromOtherRepo :: IO Key -> FilePath -> IO (Bool) copyFromOtherRepo key file = return False - diff --git a/git-annex.hs b/git-annex.hs index 556e0607e..cce49050b 100644 --- a/git-annex.hs +++ b/git-annex.hs @@ -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 |