diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-29 14:04:20 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-29 14:04:20 -0400 |
commit | cf501d3b9be89931bfede402da85cb3bdc455041 (patch) | |
tree | 3ac5aab65b15aea4648301d45e797fae2254cc28 /Remote/Hook.hs | |
parent | ecdc08dbe10e05f600ff8ac2629520138ea4839c (diff) |
set ANNEX_HASH_* always
Diffstat (limited to 'Remote/Hook.hs')
-rw-r--r-- | Remote/Hook.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Remote/Hook.hs b/Remote/Hook.hs index 2613fda7a..ba38355ca 100644 --- a/Remote/Hook.hs +++ b/Remote/Hook.hs @@ -69,16 +69,16 @@ hookSetup u c = do return c' hookEnv :: Key -> Maybe FilePath -> Maybe [(String, String)] -hookEnv k f = Just $ keyenv : fileenv f +hookEnv k f = Just $ fileenv f ++ keyenv where env s v = ("ANNEX_" ++ s, v) - keyenv = env "KEY" (show k) - fileenv Nothing = [] - fileenv (Just file) = - [ env "FILE" file + keyenv = + [ env "KEY" (show k) , env "HASH_1" (hashbits !! 0) , env "HASH_2" (hashbits !! 1) ] + fileenv Nothing = [] + fileenv (Just file) = [env "FILE" file] hashbits = map takeDirectory $ splitPath $ hashDirMixed k lookupHook :: String -> String -> Annex (Maybe String) |