optimize pre-commit in direct mode

This commit is contained in:
Joey Hess 2013-01-06 16:56:55 -04:00
parent 7888b38e3e
commit f12202f771
2 changed files with 5 additions and 5 deletions

View file

@ -20,6 +20,7 @@ import qualified Git.Command
import qualified Git.LsFiles as LsFiles
import qualified Limit
import qualified Option
import Config
seekHelper :: ([FilePath] -> Git.Repo -> IO ([FilePath], IO Bool)) -> [FilePath] -> Annex [FilePath]
seekHelper a params = do
@ -123,3 +124,6 @@ prepFiltered a fs = do
notSymlink :: FilePath -> IO Bool
notSymlink f = liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus f
whenNotDirect :: CommandSeek -> CommandSeek
whenNotDirect a params = ifM isDirect ( return [] , a params )