nukes another 15 lines thanks to ifM
This commit is contained in:
parent
ff8b6c1bab
commit
c0c9991c9f
6 changed files with 57 additions and 74 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue