summaryrefslogtreecommitdiff
path: root/Seek.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-04 19:56:32 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-04 19:56:32 -0400
commitcd699ff50b8434b52e2f51d06414e8431b407482 (patch)
tree77291f6d6f6c340c41f9da5b3bbfeae4117d7764 /Seek.hs
parentbdbfe36e945e97d66c965bc7227d1457372bce32 (diff)
fix last zombies in the assistant
Made Git.LsFiles return cleanup actions, and everything waits on processes now, except of course for Seek.
Diffstat (limited to 'Seek.hs')
-rw-r--r--Seek.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Seek.hs b/Seek.hs
index 0c703a20b..aeaf26bb7 100644
--- a/Seek.hs
+++ b/Seek.hs
@@ -16,12 +16,14 @@ import Types.Command
import Types.Key
import qualified Annex
import qualified Git
+import qualified Git.Command
import qualified Git.LsFiles as LsFiles
import qualified Limit
import qualified Option
-seekHelper :: ([FilePath] -> Git.Repo -> IO [FilePath]) -> [FilePath] -> Annex [FilePath]
-seekHelper a params = inRepo $ \g -> runPreserveOrder (`a` g) params
+seekHelper :: ([FilePath] -> Git.Repo -> IO ([FilePath], IO Bool)) -> [FilePath] -> Annex [FilePath]
+seekHelper a params = inRepo $ \g ->
+ runPreserveOrder (\fs -> Git.Command.leaveZombie <$> a fs g) params
withFilesInGit :: (FilePath -> CommandStart) -> CommandSeek
withFilesInGit a params = prepFiltered a $ seekHelper LsFiles.inRepo params
@@ -39,7 +41,7 @@ withFilesNotInGit a params = do
seekunless _ l = do
force <- Annex.getState Annex.force
g <- gitRepo
- liftIO $ (\p -> LsFiles.notInRepo force p g) l
+ liftIO $ Git.Command.leaveZombie <$> LsFiles.notInRepo force l g
withPathContents :: ((FilePath, FilePath) -> CommandStart) -> CommandSeek
withPathContents a params = map a . concat <$> liftIO (mapM get params)
@@ -72,7 +74,7 @@ withFilesUnlocked = withFilesUnlocked' LsFiles.typeChanged
withFilesUnlockedToBeCommitted :: (FilePath -> CommandStart) -> CommandSeek
withFilesUnlockedToBeCommitted = withFilesUnlocked' LsFiles.typeChangedStaged
-withFilesUnlocked' :: ([FilePath] -> Git.Repo -> IO [FilePath]) -> (FilePath -> CommandStart) -> CommandSeek
+withFilesUnlocked' :: ([FilePath] -> Git.Repo -> IO ([FilePath], IO Bool)) -> (FilePath -> CommandStart) -> CommandSeek
withFilesUnlocked' typechanged a params = do
-- unlocked files have changed type from a symlink to a regular file
typechangedfiles <- seekHelper typechanged params