diff options
author | Joey Hess <joey@kitenet.net> | 2012-03-16 01:59:07 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-03-16 01:59:07 -0400 |
commit | 184a69171d5d983ee2f08cce28011d235f44cc5c (patch) | |
tree | ff85fc620618b55c8cbed0d8c99212e73004f5b5 /Init.hs | |
parent | c0c9991c9f5322aef05f4c97d2c3f3bdc3101e46 (diff) |
removed another 10 lines via ifM
Diffstat (limited to 'Init.hs')
-rw-r--r-- | Init.hs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -58,13 +58,13 @@ gitPreCommitHookWrite = unlessBare $ do gitPreCommitHookUnWrite :: Annex () gitPreCommitHookUnWrite = unlessBare $ do hook <- preCommitHook - whenM (liftIO $ doesFileExist hook) $ do - c <- liftIO $ readFile hook - if c == preCommitScript - then liftIO $ removeFile hook - else warning $ "pre-commit hook (" ++ hook ++ + whenM (liftIO $ doesFileExist hook) $ + ifM (liftIO $ (==) preCommitScript <$> readFile hook) + ( liftIO $ removeFile hook + , warning $ "pre-commit hook (" ++ hook ++ ") contents modified; not deleting." ++ " Edit it to remove call to git annex." + ) unlessBare :: Annex () -> Annex () unlessBare = unlessM $ fromRepo Git.repoIsLocalBare |