This commit is contained in:
Joey Hess 2011-08-06 12:50:20 -04:00
parent 46ddb4e66a
commit 3ffc0bb4f5
2 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ orderedList = do
genKey :: FilePath -> Maybe (Backend Annex) -> Annex (Maybe (Key, Backend Annex)) genKey :: FilePath -> Maybe (Backend Annex) -> Annex (Maybe (Key, Backend Annex))
genKey file trybackend = do genKey file trybackend = do
bs <- orderedList bs <- orderedList
let bs' = maybe bs (:bs) trybackend let bs' = maybe bs (: bs) trybackend
genKey' bs' file genKey' bs' file
genKey' :: [Backend Annex] -> FilePath -> Annex (Maybe (Key, Backend Annex)) genKey' :: [Backend Annex] -> FilePath -> Annex (Maybe (Key, Backend Annex))
genKey' [] _ = return Nothing genKey' [] _ = return Nothing

View file

@ -32,7 +32,7 @@ sizes :: [Int]
sizes = [1, 256, 512, 224, 384] sizes = [1, 256, 512, 224, 384]
backends :: [Backend Annex] backends :: [Backend Annex]
-- order is slightly significant; want sha1 first ,and more general -- order is slightly significant; want sha1 first, and more general
-- sizes earlier -- sizes earlier
backends = catMaybes $ map genBackend sizes ++ map genBackendE sizes backends = catMaybes $ map genBackend sizes ++ map genBackendE sizes
@ -107,7 +107,7 @@ keyValueE size file = keyValue size file >>= maybe (return Nothing) addE
then "" -- probably not really an extension then "" -- probably not really an extension
else naiveextension else naiveextension
-- A key's checksum is checked during fsck. {- A key's checksum is checked during fsck. -}
checkKeyChecksum :: SHASize -> Key -> Annex Bool checkKeyChecksum :: SHASize -> Key -> Annex Bool
checkKeyChecksum size key = do checkKeyChecksum size key = do
g <- Annex.gitRepo g <- Annex.gitRepo