diff options
author | Joey Hess <joey@kitenet.net> | 2012-03-15 20:39:25 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-03-15 20:39:25 -0400 |
commit | c0c9991c9f5322aef05f4c97d2c3f3bdc3101e46 (patch) | |
tree | 9cdd4f7913659329283e8d909fa7c4f98cc567f0 /Remote/Helper/Hooks.hs | |
parent | ff8b6c1bab519f243b67219cc2b43d037b3fa4e2 (diff) |
nukes another 15 lines thanks to ifM
Diffstat (limited to 'Remote/Helper/Hooks.hs')
-rw-r--r-- | Remote/Helper/Hooks.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Remote/Helper/Hooks.hs b/Remote/Helper/Hooks.hs index 5929b1793..ed329b914 100644 --- a/Remote/Helper/Hooks.hs +++ b/Remote/Helper/Hooks.hs @@ -84,10 +84,8 @@ runHooks r starthook stophook a = do liftIO $ closeFd fd lookupHook :: Remote -> String -> Annex (Maybe String) -lookupHook r n = do - command <- getConfig (repo r) hookname "" - if null command - then return Nothing - else return $ Just command +lookupHook r n = go =<< getConfig (repo r) hookname "" where + go "" = return Nothing + go command = return $ Just command hookname = n ++ "-command" |