Require that the SHA256 backend can be used when building, since it's the default.

This commit is contained in:
Joey Hess 2012-05-31 23:15:40 -04:00
parent f5de183c71
commit 2183fd2abd
3 changed files with 8 additions and 5 deletions

View file

@ -45,7 +45,7 @@ genBackendE size =
shaCommand :: SHASize -> Maybe String
shaCommand 1 = SysConfig.sha1
shaCommand 256 = SysConfig.sha256
shaCommand 256 = Just SysConfig.sha256
shaCommand 224 = SysConfig.sha224
shaCommand 384 = SysConfig.sha384
shaCommand 512 = SysConfig.sha512

View file

@ -26,15 +26,16 @@ tests =
, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
, TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null"
, TestCase "ssh connection caching" getSshConnectionCaching
] ++ shaTestCases [1, 256, 512, 224, 384]
] ++ shaTestCases False [1, 512, 224, 384] ++ shaTestCases True [256]
shaTestCases :: [Int] -> [TestCase]
shaTestCases l = map make l
shaTestCases :: Bool -> [Int] -> [TestCase]
shaTestCases required l = map make l
where make n =
let
cmds = map (\x -> "sha" ++ show n ++ x) ["", "sum"]
key = "sha" ++ show n
in TestCase key $ maybeSelectCmd key cmds "</dev/null"
selector = if required then selectCmd else maybeSelectCmd
in TestCase key $ selector key cmds "</dev/null"
tmpDir :: String
tmpDir = "tmp"

2
debian/changelog vendored
View file

@ -6,6 +6,8 @@ git-annex (3.20120523) UNRELEASED; urgency=low
and adds them.
* Fix display of warning message when encountering a file that uses an
unsupported backend.
* Require that the SHA256 backend can be used when building, since it's the
default.
-- Joey Hess <joeyh@debian.org> Sun, 27 May 2012 20:55:29 -0400