groundwork for parameterizing hash depth

This commit is contained in:
Joey Hess 2015-01-28 15:55:17 -04:00
parent 037d86e046
commit 0fd5f257d0
11 changed files with 52 additions and 32 deletions

View file

@ -7,8 +7,6 @@
module Remote.Hook (remote) where
import qualified Data.Map as M
import Common.Annex
import Types.Remote
import Types.Key
@ -20,6 +18,9 @@ import Annex.UUID
import Remote.Helper.Special
import Utility.Env
import Data.Default
import qualified Data.Map as M
type Action = String
type HookName = String
@ -90,7 +91,7 @@ hookEnv action k f = Just <$> mergeenv (fileenv f ++ keyenv)
]
fileenv Nothing = []
fileenv (Just file) = [envvar "FILE" file]
hashbits = map takeDirectory $ splitPath $ hashDirMixed k
hashbits = map takeDirectory $ splitPath $ hashDirMixed def k
lookupHook :: HookName -> Action -> Annex (Maybe String)
lookupHook hookname action = do