better limiting of start actions to only run whenAnnexed
Mostly only refactoring, but this does remove one redundant stat of the symlink by copy.
This commit is contained in:
parent
4389782628
commit
b327227ba5
16 changed files with 67 additions and 63 deletions
|
@ -16,10 +16,10 @@ def :: [Command]
|
|||
def = [command "find" paramPaths seek "lists available files"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
seek = [withFilesInGit start]
|
||||
seek = [withFilesInGit $ whenAnnexed start]
|
||||
|
||||
start :: FilePath -> CommandStart
|
||||
start file = isAnnexed file $ \(key, _) -> do
|
||||
start :: FilePath -> (Key, Backend Annex) -> CommandStart
|
||||
start file (key, _) = do
|
||||
-- only files inAnnex are shown, unless the user has requested
|
||||
-- others via a limit
|
||||
whenM (liftM2 (||) (inAnnex key) limited) $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue