diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-06 16:56:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-06 16:56:55 -0400 |
commit | 17795032db18efd9ca7234d8adbef1c524f89f34 (patch) | |
tree | aca729c892382f1fb23706ed4cfe22230d50d7bc /Seek.hs | |
parent | f8657604dcb4e265637cfce3481adb9518d1a049 (diff) |
optimize pre-commit in direct mode
Diffstat (limited to 'Seek.hs')
-rw-r--r-- | Seek.hs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 ) |