remove whenAnnexed and ifAnnexed

In preparation for adding a new variation on lookupKey.

Sponsored-by: Max Thoursie on Patreon
This commit is contained in:
Joey Hess 2022-10-26 13:58:20 -04:00
parent 1944549a38
commit b2ee2496ee
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 56 additions and 36 deletions

View file

@ -18,6 +18,7 @@ import qualified Database.Keys
import Annex.Content
import Annex.Init
import Annex.CheckIgnore
import Annex.WorkTree
import Utility.FileMode
import qualified Utility.RawFilePath as R
@ -50,13 +51,17 @@ seek ps = do
l <- workTreeItems ww ps
withFilesNotInGit
(CheckGitIgnore False)
WarnUnmatchWorkTreeItems
(\(_, f) -> commandAction $ whenAnnexed (startCheckIncomplete . fromRawFilePath) f)
WarnUnmatchWorkTreeItems
checksymlinks
l
withFilesInGitAnnex ww (Command.Unannex.seeker True) l
finish
where
ww = WarnUnmatchLsFiles
checksymlinks (_, f) =
commandAction $ lookupKey f >>= \case
Nothing -> stop
Just k -> startCheckIncomplete (fromRawFilePath f) k
{- git annex symlinks that are not checked into git could be left by an
- interrupted add. -}