summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Common.hs2
-rw-r--r--Remote/Hook.hs7
-rw-r--r--Utility/PartialPrelude.hs (renamed from Utility/BadPrelude.hs)6
-rw-r--r--debian/changelog1
4 files changed, 8 insertions, 8 deletions
diff --git a/Common.hs b/Common.hs
index f3dd701b1..90895f08e 100644
--- a/Common.hs
+++ b/Common.hs
@@ -26,4 +26,4 @@ import Utility.Path as X
import Utility.Directory as X
import Utility.Monad as X
-import Utility.BadPrelude as X
+import Utility.PartialPrelude as X
diff --git a/Remote/Hook.hs b/Remote/Hook.hs
index ab84533b2..5c761f43b 100644
--- a/Remote/Hook.hs
+++ b/Remote/Hook.hs
@@ -62,13 +62,12 @@ hookEnv k f = Just $ fileenv f ++ keyenv
env s v = ("ANNEX_" ++ s, v)
keyenv =
[ env "KEY" (show k)
- , env "HASH_1" hash_1
- , env "HASH_2" hash_2
+ , env "HASH_1" (hashbits !! 0)
+ , env "HASH_2" (hashbits !! 1)
]
fileenv Nothing = []
fileenv (Just file) = [env "FILE" file]
- [hash_1, hash_2, _rest] =
- map takeDirectory $ splitPath $ hashDirMixed k
+ hashbits = map takeDirectory $ splitPath $ hashDirMixed k
lookupHook :: String -> String -> Annex (Maybe String)
lookupHook hooktype hook =do
diff --git a/Utility/BadPrelude.hs b/Utility/PartialPrelude.hs
index 04c9d9b0b..ad857196d 100644
--- a/Utility/BadPrelude.hs
+++ b/Utility/PartialPrelude.hs
@@ -1,11 +1,11 @@
-{- Some stuff from Prelude should not be used, as it tends to be a source
- - of bugs.
+{- Parts of the Prelude are partial functions, which are a common source of
+ - bugs.
-
- This exports functions that conflict with the prelude, which avoids
- them being accidentially used.
-}
-module Utility.BadPrelude where
+module Utility.PartialPrelude where
{- read should be avoided, as it throws an error
- Instead, use: readMaybe -}
diff --git a/debian/changelog b/debian/changelog
index 3c977e817..e187d8f6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ git-annex (3.20111212) UNRELEASED; urgency=low
* Union merge now finds the least expensive way to represent the merge.
* reinject: Add a sanity check for using an annexed file as the source file.
* Properly handle multiline git config values.
+ * Fix the hook special remote, which bitrotted a while ago.
-- Joey Hess <joeyh@debian.org> Mon, 12 Dec 2011 01:57:49 -0400