summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-12 13:22:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-12 13:22:16 -0400
commit3724344461d50a606419bd483a5513c0a139f43e (patch)
treec4193ef1d3715761a3b6ede1abe5f32a952923ff /Backend
parent6e08bf96336a6beee233e0dfa60728e3f6983334 (diff)
SHA256E is new default backend
The default backend used when adding files to the annex is changed from SHA256 to SHA256E, to simplify interoperability with OSX, media players, and various programs that needlessly look at symlink targets. To get old behavior, add a .gitattributes containing: * annex.backend=SHA256
Diffstat (limited to 'Backend')
-rw-r--r--Backend/SHA.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Backend/SHA.hs b/Backend/SHA.hs
index 8f7dbe774..497e7d7e2 100644
--- a/Backend/SHA.hs
+++ b/Backend/SHA.hs
@@ -1,4 +1,4 @@
-{- git-annex SHA backend
+{- git-annex SHA backends
-
- Copyright 2011,2012 Joey Hess <joey@kitenet.net>
-
@@ -19,13 +19,14 @@ import qualified Data.ByteString.Lazy as L
type SHASize = Int
--- order is slightly significant; want SHA256 first, and more general
--- sizes earlier
+{- Order is slightly significant; want SHA256 first, and more general
+ - sizes earlier. -}
sizes :: [Int]
sizes = [256, 1, 512, 224, 384]
+{- The SHA256E backend is the default. -}
backends :: [Backend]
-backends = catMaybes $ map genBackend sizes ++ map genBackendE sizes
+backends = catMaybes $ map genBackendE sizes ++ map genBackend sizes
genBackend :: SHASize -> Maybe Backend
genBackend size = Just $ Backend