diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-28 15:55:17 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-28 15:55:17 -0400 |
commit | 7ca8ec00a7fcda71a08d22f06838424765a1b215 (patch) | |
tree | aa377fccb40797a734372127c19177524fa8af2b /Remote/Hook.hs | |
parent | 3327618e5b48afb10a8f98afe15c750d8ed4c416 (diff) |
groundwork for parameterizing hash depth
Diffstat (limited to 'Remote/Hook.hs')
-rw-r--r-- | Remote/Hook.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Remote/Hook.hs b/Remote/Hook.hs index ce7781cfb..31b5ab7c5 100644 --- a/Remote/Hook.hs +++ b/Remote/Hook.hs @@ -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 |